-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (55 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
62 lines (55 loc) · 1.39 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
version: "3.9"
services:
nginx:
build:
context: ./
dockerfile: ./deployment/nginx/Dockerfile
volumes:
- static:/static
- ../certbot:/etc/letsencrypt
ports:
- "80:80"
- "443:443"
depends_on:
- notepad-djangocorn
restart: on-failure:1
environment:
- NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d
- DOMAIN_HOST=${DOMAIN_HOST}
notepad-djangocorn:
build:
context: ./
dockerfile: ./deployment/django/Dockerfile
expose:
- "8000"
volumes:
- static:/my_app/src/static
depends_on:
- notepad-postgresql
restart: on-failure:1
environment:
- DEBUG=${DJANGO_DEBUG}
- SECRET_KEY=${DJANGO_SECRET_KEY}
- ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
- CSRF_TRUSTED_ORIGINS=${DJANGO_CSRF_TRUSTED_ORIGINS}
- DB_NAME=${POSTGRES_DB_NAME}
- DB_USER=${POSTGRES_USER}
- DB_PASSWORD=${POSTGRES_PASSWORD}
- DB_HOST=${POSTGRES_HOST}
- DB_PORT=${POSTGRES_PORT}
notepad-postgresql:
build:
context: ./
dockerfile: ./deployment/postgresql/Dockerfile
expose:
- "5432"
volumes:
- postgres_database:/var/lib/postgresql
restart: on-failure:1
environment:
- POSTGRES_DB=${POSTGRES_DB_NAME}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
static:
postgres_database: