forked from brazil-data-cube/cube-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (67 loc) · 1.9 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# This file is part of Python Module for Cube Builder.
# Copyright (C) 2019-2020 INPE.
#
# Cube Builder free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
#
version: '3.1'
networks:
cube_builder_net:
services:
mq:
image: rabbitmq:3-management
container_name: cube-builder-rabbitmq
hostname: cube-builder-rabbitmq
restart: "always"
volumes:
- "./volumes/rabbitmq:/var/lib/rabbitmq"
ports:
- "15672:15672"
- "5672:5672"
networks:
- cube_builder_net
cube-builder:
build:
context: .
dockerfile: ./docker/Dockerfile
container_name: cube-builder-api
image: registry.dpi.inpe.br/brazildatacube/cube-builder:latest
restart: "always"
environment:
- "RABBIT_MQ_URL=pyamqp://guest@cube-builder-rabbitmq"
- "SQLALCHEMY_DATABASE_URI=postgresql://postgres:bdc_collection_builder2019@bdc_collection_builder-pg:5432/bdc_scripts"
- "DATA_DIR=/gfs"
- "LC_ALL=C.UTF-8"
- "LANG=C.UTF-8"
- "FLASK_ENV=production"
networks:
- cube_builder_net
ports:
- "5000:5000"
volumes:
- /gfs:/gfs
command: >
bash -c "cube-builder run --host 0.0.0.0"
depends_on:
- mq
worker:
container_name: cube-builder-worker
image: registry.dpi.inpe.br/brazildatacube/cube-builder:latest
restart: "always"
depends_on:
- mq
- cube-builder
volumes:
- /gfs:/gfs
environment:
- "RABBIT_MQ_URL=pyamqp://guest@cube-builder-rabbitmq"
- "SQLALCHEMY_DATABASE_URI=postgresql://postgres:bdc_collection_builder2019@bdc_collection_builder-pg:5432/bdc_scripts"
- "DATA_DIR=/gfs"
- "LC_ALL=C.UTF-8"
- "LANG=C.UTF-8"
- "FLASK_ENV=production"
command: >
cube-builder worker -l INFO --concurrency 8 --max-tasks-per-child=30
networks:
- cube_builder_net