-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
41 lines (39 loc) · 1.02 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
version: '3.7'
services:
db:
restart: always
image: postgres
environment:
POSTGRES_DB: "dtekportal"
POSTGRES_PASSWORD: "$DB_PASSWORD"
volumes:
# Makes database data persist even if we restart/rebuild container
- db_data:/var/lib/postgresql/data
web:
build: .
restart: always
environment:
DB_NAME: "dtekportal"
DB_USER: "postgres"
DB_PASSWORD: "$DB_PASSWORD"
DB_HOST: "db"
DB_PORT: "5432"
DJANGO_SECRET_KEY: "$DJANGO_SECRET_KEY"
depends_on:
- db
volumes:
- ./logs:/logs
- static:/code/staticfiles/
proxy:
image: nginx:1-alpine
restart: unless-stopped
ports:
- "8080:80"
depends_on:
- web
volumes:
- static:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
volumes:
db_data:
static: