-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.19 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
version: '3.3'
services:
db:
build:
context: .
dockerfile: ./docker/db.Dockerfile
image: corere_postgres:latest
env_file:
- docker/settings.env
environment:
POSTGRES_USER_FILE: /run/secrets/secret-db-user
POSTGRES_PASSWORD_FILE: /run/secrets/secret-db-password
ports:
- "5432:5432"
secrets:
- secret-db-user
- secret-db-password
web:
env_file:
- docker/settings.env
build:
context: .
dockerfile: ./docker/web.Dockerfile
image: corere_web:latest
command: bash -c ". /run/secrets/secret-web-sh && python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic --no-input && gunicorn --bind=0.0.0.0 corere.wsgi"
depends_on:
- db
# ports:
# - 8000:8000
secrets:
- secret-web-sh
nginx:
build:
context: .
dockerfile: ./docker/nginx.Dockerfile
image: corere_nginx:latest
container_name: nginx-proxy
ports:
- 8080:8080
depends_on:
- web
secrets:
secret-web-sh:
file: ./docker/secret.web.sh
secret-db-user:
file: ./docker/secret.db.user
secret-db-password:
file: ./docker/secret.db.password