-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
52 lines (47 loc) · 959 Bytes
/
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.6'
services:
db:
image: postgres:alpine
environment:
POSTGRES_USER: mymoviedb
POSTGRES_PASSWORD: mymoviedb
POSTGRES_DB: mymoviedb
command: -c fsync=off
volumes:
- pgdata:/var/lib/postgresql/data
app:
build:
context: .
image: mymoviedb:latest
entrypoint: gunicorn
command: --reload --workers=5 --threads=2 --max-requests 1000 --bind 0.0.0.0:8000 mymoviedb.wsgi
ports:
- 8000
volumes:
- .:/app/mymoviedb
depends_on:
- db
api:
image: mymoviedb:latest
environment:
DJANGO_SETTINGS_MODULE: 'mymoviedb.settings'
entrypoint: python
command: aio-server.py
ports:
- 8080
volumes:
- .:/app/mymoviedb
depends_on:
- app
- db
proxy:
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
depends_on:
- app
- api
volumes:
pgdata: