forked from di2ag/chp_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-jenkins.yml
38 lines (36 loc) · 1.36 KB
/
docker-compose-jenkins.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
version: '3.7'
services:
web:
build:
context: ./chp_api
dockerfile: Dockerfile.stage
command: gunicorn -c gunicorn.config-stage.py --env DJANGO_SETTINGS_MODULE=chp_api.settings.staging chp_api.wsgi:application --bind 0.0.0.0:8000 --access-logfile gunicorn-access.log --error-logfile gunicorn-error.log --log-level debug
volumes:
- static_volume:/home/chp_api/web/staticfiles
expose:
- 8000
env_file:
- ./.env.stage
depends_on:
- db
db:
image: postgres:12.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=chp_api_user
- POSTGRES_PASSWORD=chp_api_user
- POSTGRES_DB=chp_api_prod
env_file:
- ./.env.stage.db
nginx:
build: ./nginx
volumes:
- static_volume:/home/chp_api/web/staticfiles
ports:
- 80:80
depends_on:
- web
volumes:
postgres_data:
static_volume: