-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (36 loc) · 1.04 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
version: '3'
services:
movie-app:
container_name: movie-app
image: movie-app
build: .
restart: unless-stopped
command: bash -c "python manage.py collectstatic --noinput && python manage.py migrate --noinput && python manage.py runserver 0.0.0.0:8000"
# command: bash -c "python manage.py collectstatic --noinput && python manage.py migrate --noinput && gunicorn mysite.wsgi -b 0.0.0.0:8000 --workers 2"
env_file:
- .env
volumes:
- ./movie-media:/movie-media
- ./movie-static:/movie-static
expose:
- 8000
ports:
- "8000:8000"
depends_on:
- movie-database
movie-database:
container_name: movie-database
image: postgres:9.4
restart: unless-stopped
environment:
POSTGRES_PASSWORD: postgres # required; superuser password
POSTGRES_USER: postgres # superuser to be created
POSTGRES_DB: db # database to be created
volumes:
- movie-data:/var/lib/postgresql/data
ports:
- "5432:5432"
expose:
- 5432
volumes:
movie-data: