forked from fga-eps-mds/2019.2-Acacia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.deploy.yml
65 lines (58 loc) · 1.74 KB
/
docker-compose.deploy.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
version: '3.7'
services:
postgres-staging:
image: postgres
env_file: ./.enviroments/.staging.deploy
volumes:
- ./staging-data/postgres/pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
labels:
- "com.centurylinklabs.watchtower.enable=false"
django-staging:
container_name: django-staging
image: acaciaelis/acacia:django-staging
env_file: ./.enviroments/.staging.deploy
command: bash -c "
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
depends_on:
- postgres-staging
labels:
- "com.centurylinklabs.watchtower.enable=true"
# Prod -----------------------------------------------------
postgres-production:
image: postgres
env_file: ./.enviroments/.production.deploy
volumes:
- ./production-data/postgres/pgdata:/var/lib/postgresql/data
ports:
- "5433:5432"
labels:
- "com.centurylinklabs.watchtower.enable=false"
django-production:
container_name: django-production
image: acaciaelis/acacia:django-prod
env_file: ./.enviroments/.production.deploy
command: bash -c "
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py runserver 0.0.0.0:8000"
ports:
- "8001:8000"
depends_on:
- postgres-production
labels:
- "com.centurylinklabs.watchtower.enable=true"
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 30
labels:
- "com.centurylinklabs.watchtower.enable=false"