forked from factly/janaganana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
35 lines (35 loc) · 858 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
version: '2'
networks:
ci-net:
external: true
services:
ci-db:
image: postgres:latest
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: factlyin
POSTGRES_USER: factlyin
POSTGRES_PASSWORD: factlyin
ports:
- 5432:5432
networks:
- ci-net
ci-app:
build:
context: .
# command: /bin/sh -c "./db_install.sh && python /usr/src/app/manage.py runserver 0.0.0.0:8000"
command: /bin/sh -c "python check_db.py --service-name ci-db --ip ci-db --port 5432 && ./db_install.sh && python /usr/src/app/manage.py runserver 0.0.0.0:8000"
environment:
- DJANGO_SECRET_KEY=secret-key-1234567890
working_dir: /usr/src/app
volumes:
- .:/usr/src/app
ports:
- 8000:8000
networks:
- ci-net
depends_on:
- ci-db
volumes:
pgdata: