-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (72 loc) · 1.47 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3.1'
services:
db:
image: postgres:alpine
container_name: "db_dev"
environment:
POSTGRES_USER: upperroom
POSTGRES_PASSWORD: "12345678"
restart: unless-stopped
volumes:
- "/data/postgres_dev:/var/lib/postgresql/data"
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_READ_SEARCH
- FOWNER
- SETGID
- SETUID
read_only: true
tmpfs:
- /tmp
- /run/postgresql
networks:
backend:
django:
image: "upperroom:latest"
container_name: "django_dev"
environment:
DJANGO_SETTINGS_MODULE: upperroom.settings
SECRET_KEY: "12345678"
GUNICORN_CMD_ARGS: "--workers=1 --threads=2"
DATABASE_URL: psql://upperroom:12345678@db:5432/upperroom
DEBUG: "'True'"
VHOST: "localhost docker"
restart: unless-stopped
volumes:
- "/data/django_dev5:/django/data"
cap_drop:
- ALL
depends_on:
- db
networks:
backend:
frontend:
aliases:
- "django_dev"
nginx:
image: nginx:alpine
container_name: nginx
restart: unless-stopped
ports:
- 80:80
volumes:
- /data/nginx.conf:/etc/nginx/nginx.conf:ro
- "/data/django_dev:/data"
cap_drop:
- ALL
cap_add:
- CHOWN
- NET_BIND_SERVICE
- SETGID
- SETUID
read_only: true
tmpfs:
- /var/cache/nginx
- /docker-entrypoint.d
networks:
frontend:
networks:
backend:
frontend: