-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.preprod.yml
80 lines (73 loc) · 1.66 KB
/
docker-compose.preprod.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
version: '3.7'
services:
db:
container_name: metadataapi_db
image: postgres:12.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=django
- POSTGRES_PASSWORD=dev1234
- POSTGRES_DB=meta_data_api
ports:
- 5432:5432
redis:
container_name: metadataapi_redis
image: "redis:alpine"
web:
container_name: metadataapi_django
build: .
command: bash -c "python3 /code/manage.py migrate --noinput && python3 /code/manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
environment:
- ENV=PREPROD
ports:
- 8000:8000
depends_on:
- db
- redis
celery:
build: .
command: celery -A MetaDataApi worker -l info
restart: on-failure
environment:
- ENV=PREPROD
volumes:
- .:/code
depends_on:
- db
- redis
celery-beat:
build: .
command: celery -A MetaDataApi beat -l INFO --pidfile= --scheduler django_celery_beat.schedulers:DatabaseScheduler
restart: on-failure
environment:
- ENV=PREPROD
volumes:
- .:/code
depends_on:
- db
- redis
flower:
container_name: metadataapi_flower
image: mher/flower
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- FLOWER_PORT=8888
ports:
- 8888:8888
# pgadmin:
# container_name: metadataapi_pgadmin
# restart: always
# image: dpage/pgadmin4
# ports:
# - 8000:8000
# environment:
# PGADMIN_DEFAULT_EMAIL: [email protected]
# PGADMIN_DEFAULT_PASSWORD: dev1234
# volumes:
# - pgadmin_data:/var/lib/pgadmin
volumes:
postgres_data:
pgadmin_data: