-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
51 lines (46 loc) · 1.03 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
40
41
42
43
44
45
46
47
48
49
50
51
version: '3.2'
services:
postgres:
image: postgres:10
container_name: booker_postgres
volumes:
- "/var/run/postgres/postgres.sock:/var/run/postgres/postgres.sock"
- "dbdata:/var/lib/postgresql/data"
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_DATABASE}
expose:
- "${DB_PORT}"
ports:
- ${DB_PORT}:${DB_PORT}
command:
-p ${DB_PORT}
healthcheck:
test: pg_isready -U ${DB_USER} -t 10
interval: 1s
timeout: 10s
retries: 100
networks:
- finteh-network
booker:
build: .
container_name: booker
volumes:
- ./:/booker
command: >
bash -c "pipenv run alembic upgrade head
&& pipenv run python . "
ports:
- '${HTTP_PORT_HOST}:${HTTP_PORT}'
expose:
- "${HTTP_PORT}"
depends_on:
- postgres
networks:
- finteh-network
volumes:
dbdata:
networks:
finteh-network:
external: true