-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
148 lines (138 loc) · 3.1 KB
/
docker-compose.yml
File metadata and controls
148 lines (138 loc) · 3.1 KB
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
version: '3.9'
services:
geoapi:
build:
context: .
dockerfile: Dockerfile
image: geoapi
env_file:
- .env
container_name: geoapi
entrypoint: /code/startup_service.sh
hostname: server
ports:
- '8000:8000'
networks:
- network_geoapi
volumes:
- .:/code
- geoapi_data:/tmp/geo_file_storage/
environment:
- PORT=8000
depends_on:
- postgres
geoapi2:
build:
context: .
dockerfile: Dockerfile
image: geoapi2
env_file:
- .env
container_name: geoapi2
entrypoint: /code/startup_service.sh
hostname: server2
ports:
- '8001:8001'
networks:
- network_geoapi
volumes:
- .:/code
- geoapi_data:/tmp/geo_file_storage/
environment:
- PORT=8001
nginx-server:
container_name: nginx-server
build: ./nginx
ports:
- 1337:80
networks:
- network_geoapi
depends_on:
- geoapi
- geoapi2
postgres:
image: mdillon/postgis:11
container_name: postgres
ports:
- "25432:5432"
environment:
POSTGRES_DB: 'publication'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'SECRET'
POSTGRES_MULTIPLE_EXTENSIONS: postgis,hstore,postgis_topology
networks:
- network_geoapi
volumes:
- volume_geoapi:/var/lib/postgresql/
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
retries: 5
restart: unless-stopped
pgadmin4:
image: dpage/pgadmin4
container_name: pgadmin4
ports:
- '5050:80'
environment:
PGADMIN_DEFAULT_EMAIL: admin@domain.com
PGADMIN_DEFAULT_PASSWORD: admin
networks:
- network_geoapi
links:
- postgres
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
hostname: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=mypass
networks:
- network_geoapi
ports:
# Expose the port for the worker to add/get tasks
- 5672:5672
# OPTIONAL: Expose the GUI port
- 15672:15672
celeryworker:
container_name: celeryworker
build: .
networks:
- network_geoapi
volumes:
- .:/code
env_file:
- .env
entrypoint: /code/start_celery.sh
environment:
- PYTHONUNBUFFERED=1
- rabbitmq_uri=amqp://admin:mypass@rabbitmq:5672
- CELERY_BROKER_URL=amqp://admin:mypass@rabbitmq:5672//
- CELERY_RESULT_BACKEND=amqp://admin:mypass@rabbitmq:5672//
links:
- rabbitmq
depends_on:
- rabbitmq
flower:
image: mher/flower
container_name: flower
networks:
- network_geoapi
command: celery --broker=amqp://admin:mypass@rabbitmq:5672// flower --broker_api=http://admin:mypass@rabbitmq:15672/api/ --port=8888
environment:
- CELERY_BROKER_URL=amqp://admin:mypass@rabbitmq:5672//
ports:
- 8888:8888
depends_on:
- celeryworker
- geoapi
- geoapi2
volumes:
volume_geoapi:
driver: 'local'
geoserver_data:
geoapi_data:
networks:
network_geoapi:
driver: 'bridge'