-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
51 lines (48 loc) · 1.16 KB
/
docker-compose-dev.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
services:
web:
image: hernansaa/crypto-portfolio-manager:0630563e424961a3d421ccd323ee35967a2d8471
container_name: crypto-portfolio-manager
command: >
sh -c "
python manage.py migrate &&
python manage.py collectstatic --noinput &&
gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 3
# NEW_RELIC_CONFIG_FILE=/app/newrelic.ini newrelic-admin run-program gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 3
"
ports:
- "8000"
env_file:
- .env.prod
volumes:
- static:/static
- django_logs:/logs
restart: always
depends_on:
- db
db:
image: postgres
container_name: postgres-db
restart: always
environment:
POSTGRES_USER: hello_django
POSTGRES_PASSWORD: hello_django
POSTGRES_DB: hello_django_prod
volumes:
- postgres_data:/var/lib/postgres/data/
ports:
- "5432:5432"
nginx:
build: ./nginx
volumes:
- static:/static
- nginx_logs:/var/log/nginx
ports:
- "8000:80"
depends_on:
- web
restart: always
volumes:
static:
postgres_data:
django_logs:
nginx_logs: