-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.jenkins.yml
executable file
·39 lines (38 loc) · 1.35 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
39
version: "3"
#PORTS NOT EXPOSED TO HOST ON JENKINS; NO USE FOR THEM
services:
db:
image: postgres:10 # same version as on heroku
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: prevencija
volumes:
- ./postgres/data:/var/lib/postgresql/data
- ./postgres/snapshots:/var/lib/postgresql/snapshots
expose:
- "5432"
backend:
build:
context: ./backend
volumes:
- "./backend/:/app/"
environment:
DEBUG: "TRUE"
DJANGO_SETTINGS_MODULE: "prevencija.settings"
DATABASE_URL: "postgres://postgres:postgres@db:5432/prevencija"
REMOTE_DEBUG: "TRUE"
depends_on:
- db
# In development mode, we want overwrite the CMD from the Dockerfile
# in order to use manage.py, and run the update_project script every
# time we restart.
command: >-
sh -c "
pip install -r requirements.txt &&
pip install -r dev-requirements.txt &&
./scripts/wait-for-postgres.sh db postgres postgres &&
python manage.py migrate --noinput &&
python manage.py collectstatic &&
python manage.py runserver 0.0.0.0:8000
"