-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
53 lines (48 loc) · 1 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
52
53
version: '3.7'
services:
fizz-buzz: &app
tty: true
build:
context: .
args:
INSTALL_ARGS: '--dev'
container_name: fizz-buzz
environment:
# use in code
- DEBUG=True
- MAX_LIMIT=100
- DB_ENGINE=postgresql
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_NAME=postgres
restart: always
volumes:
- .:/fizz-buzz:delegated
depends_on:
- db
ports:
- 8080:8080
command: python -m service
db:
image: postgres:10
container_name: fizz-buzz-db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- 5432:5432
migrate:
<<: *app
container_name: fizz-buzz-migrations
restart: "no"
command: alembic upgrade head
test:
<<: *app
container_name: fizz-buzz-test
restart: "no"
ports:
- 8082:8082
command: pytest --cov=service tests/