-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (39 loc) · 921 Bytes
/
docker-compose.yml
File metadata and controls
45 lines (39 loc) · 921 Bytes
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
---
version: "2"
services:
app:
build: .
volumes:
- .:/usr/src/app
ports:
- 5000:5000
env_file:
- ./.env
command: poetry run flask run --host 0.0.0.0 --port 5000
# command: tail -f /dev/null
app-db:
image: postgres:11.1-alpine
volumes:
- postgres_volume:/var/lib/postgresql/data/
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=app
- POSTGRES_PASSWORD=password
- POSTGRES_DB=app
ports:
- 5432:5432
app-test-db:
image: postgres:11.1-alpine
volumes:
- postgres_test_volume:/var/lib/postgresql/data/
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=app
- POSTGRES_PASSWORD=password
- POSTGRES_DB=app
- PGPORT=5433
ports:
- 5433:5433
volumes:
postgres_volume:
postgres_test_volume: