-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
154 lines (146 loc) · 4.82 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#
# This file is part of Brazil Data Cube Collection Builder.
# Copyright (C) 2022 INPE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.html>.
#
networks:
bdc_net:
services:
redis:
image: redis
container_name: bdc-collection-builder-redis
restart: "always"
ports:
- "6379:6379"
networks:
- bdc_net
mq:
image: rabbitmq:3-management
container_name: bdc-collection-builder-rabbitmq
hostname: bdc-collection-builder-rabbitmq
restart: "always"
volumes:
- "./volumes/rabbitmq:/var/lib/rabbitmq"
ports:
- "15672:15672"
- "5672:5672"
networks:
- bdc_net
postgres:
image: mdillon/postgis
container_name: bdc-collection-builder-pg
restart: "always"
shm_size: 1gb
volumes:
- ./volumes/pg:/var/lib/postgresql/data
environment:
- "POSTGRES_PASSWORD=postgres"
networks:
- bdc_net
ports:
- "5432:5432"
api:
build:
context: .
dockerfile: ./docker/Dockerfile
container_name: bdc-collection-builder-api
image: bdc/bdc-collection-builder:latest
restart: "always"
environment:
- "REDIS_URL=redis://bdc-collection-builder-redis:6379"
- "RABBIT_MQ_URL=pyamqp://guest@bdc-collection-builder-rabbitmq"
- "SQLALCHEMY_DATABASE_URI=postgresql://postgres:postgres@bdc-collection-builder-pg:5432/bdc"
- "DATA_DIR=/data"
networks:
- bdc_net
ports:
- "5000:5000"
volumes:
- /data:/data
command: >
bash -c "bdc-collection-builder run --host 0.0.0.0"
depends_on:
- mq
- redis
- postgres
# Celery
worker-download:
container_name: bdc-collection-builder-worker-download
image: bdc/bdc-collection-builder:latest
restart: "always"
depends_on:
- mq
- api
environment:
- "REDIS_URL=redis://bdc-collection-builder-redis:6379"
- "RABBIT_MQ_URL=pyamqp://guest@bdc-collection-builder-rabbitmq"
- "SQLALCHEMY_DATABASE_URI=postgresql://postgres:postgres@bdc-collection-builder-pg:5432/bdc"
- "DATA_DIR=/data"
volumes:
- /data:/data
command: >
celery -A bdc_collection_builder.celery.worker:celery worker -l INFO --concurrency 2 -Q download
networks:
- bdc_net
worker-atm-correction:
build:
context: .
dockerfile: ./docker/Dockerfile.atm
container_name: bdc-collection-builder-worker-atm-correction
image: bdc/bdc-collection-builder-atm:latest
restart: "always"
depends_on:
- mq
- api
environment:
- "REDIS_URL=redis://bdc-collection-builder-redis:6379"
- "RABBIT_MQ_URL=pyamqp://guest@bdc-collection-builder-rabbitmq"
- "SQLALCHEMY_DATABASE_URI=postgresql://postgres:postgres@bdc-collection-builder-pg:5432/bdc"
- "DATA_DIR=/data"
# The following variables are related to laSRC and ledaps execution.
- "L8_AUX_DIR=/mnt/auxiliaries/L8"
- "LEDAPS_AUX_DIR=/mnt/auxiliaries/ledaps"
# Sen2cor
- "SEN2COR_DOCKER_IMAGE=registry.dpi.inpe.br/brazildatacube/sen2cor:2.8.0"
- "SEN2COR_AUX_DIR=/mnt/auxiliaries/sen2cor/CCI4SEN2COR"
- "SEN2COR_CONFIG_DIR=/mnt/auxiliaries/sen2cor/config/2.8"
# LaSRC
- "LASRC_DOCKER_IMAGE=registry.dpi.inpe.br/brazildatacube/lasrc-ledaps-fmask:1.0.4"
- "LASRC_AUX_DIR=/mnt/auxiliaries/L8"
- "LEDAPS_AUX_DIR=/mnt/auxiliaries/ledaps_auxiliaries"
volumes:
- /data:/data
- /mnt/auxiliaries:/mnt/auxiliaries
entrypoint: ["celery", "worker", "-A", "bdc_collection_builder.celery.worker:celery", "-l", "INFO", "--concurrency", "2", "-Q", "correction"]
networks:
- bdc_net
worker-publish:
container_name: bdc-collection-builder-worker-publish
image: registry.dpi.inpe.br/brazildatacube/bdc-collection-builder:latest
restart: "always"
depends_on:
- mq
- api
volumes:
- /data:/data
environment:
- "REDIS_URL=redis://bdc-collection-builder-redis:6379"
- "RABBIT_MQ_URL=pyamqp://guest@bdc-collection-builder-rabbitmq"
- "DATA_DIR=/data"
- "SQLALCHEMY_DATABASE_URI=postgresql://postgres:postgres@bdc-collection-builder-pg:5432/bdc"
command: >
celery worker -A bdc_collection_builder.celery.worker:celery -l INFO --concurrency 2 -Q publish
networks:
- bdc_net