-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (59 loc) · 1.36 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
version: '3'
services:
nginx:
restart: always
build: ./etc/nginx
container_name: webcams_nginx
volumes:
- "static:/static"
- "media:/media_app"
networks:
- default
ports:
- "80:80"
links:
- app:app
depends_on:
- app
db:
environment:
POSTGRES_DB: ${WC_POSTGRES_DB:-webcams_db}
POSTGRES_USER: ${WC_POSTGRES_USER:-webcams_user}
POSTGRES_PASSWORD: ${WC_POSTGRES_PASSWORD?WC_POSTGRES_PASSWORD empty}
restart: always
image: postgres:10-alpine
container_name: webcams_db
volumes:
- "pgsql:/var/lib/postgresql/data"
networks:
- default
expose:
- "5432"
ports:
- "${IA_POSTGRES_HOST_PORT:-9542}:5432"
app:
environment:
DATABASE_URL: postgres://${WC_POSTGRES_USER:-webcams_user}:${WC_POSTGRES_PASSWORD?IA_POSTGRES_PASSWORD empty}@db:5432/${WC_POSTGRES_DB:-webcams_db}
DJANGO_SETTINGS_MODULE: ${WC_DJANGO_SETTINGS_MODULE:-settings.production}
restart: always
build:
context: .
dockerfile: ./Dockerfile
container_name: webcams_app
entrypoint: ./docker-entrypoint.sh
command: /usr/local/bin/uwsgi
volumes:
- "static:/static"
- "media:/media_app"
networks:
- default
links:
- db:db
depends_on:
- db
networks:
default:
volumes:
pgsql:
static:
media: