-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
81 lines (72 loc) · 1.52 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
x-images:
django: &django
build:
context: .
dockerfile: .docker/backend/Dockerfile
target: dev
user: ${UID:-1000}:${GID:-1000}
environment:
- DJANGO_SETTINGS_MODULE=project.settings.dev
env_file:
- db.env
- app.env
volumes:
- .:/opt/terra-visu
services:
db:
image: postgis/postgis:15-3.3
env_file:
- db.env
ports:
- "127.0.0.1:5432:5432"
volumes:
- db:/var/lib/postgresql/data
redis:
image: redis:7-alpine
volumes:
- redis:/data
elasticsearch:
hostname: elasticsearch
image: elasticsearch:7.16.2
environment:
ES_JAVA_OPTS: ${ES_JAVA_OPTS:--Xms1g -Xmx1g}
healthcheck:
test:
[
'CMD-SHELL',
'curl --silent --fail localhost:9200/_cluster/health || exit 1',
]
interval: 30s
timeout: 30s
retries: 3
volumes:
- ./conf/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- elasticsearch:/usr/share/elasticsearch/data/
web:
<<: [ *django ]
ports:
- "8000:8000"
depends_on:
- db
- redis
celery:
<<: [ *django ]
command: celery -A project worker -B -c 1 -l INFO -E
depends_on:
- db
- web
- redis
nginx:
image: nginx:latest
ports:
- "8080:80"
depends_on:
- web
- elasticsearch
volumes:
- ./public:/var/www/
- ./conf/nginx.dev.conf:/etc/nginx/conf.d/default.conf
volumes:
db:
redis:
elasticsearch: