-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
72 lines (72 loc) · 1.43 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: "3.8"
services:
database:
image: postgres:14.2
environment:
- POSTGRES_DB=skim
- POSTGRES_USER=skim
- POSTGRES_PASSWORD=skim-password
ports:
- 15432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
test-database:
image: postgres:14.5
environment:
POSTGRES_DB: skim
POSTGRES_USER: skim
POSTGRES_PASSWORD: skim-password
tmpfs:
- /var/lib/postgresql/data
manage:
depends_on:
- database
build:
context: .
dockerfile: Dockerfile
environment:
PYTHONUNBUFFERED: 1
DB_HOST: database
DB_USER: skim
DB_PASSWORD: skim-password
DB_NAME: skim
entrypoint: python -m manage
volumes:
- feeds:/feeds/
- ./:/skim/
server:
depends_on:
- database
build:
context: .
dockerfile: Dockerfile
ports:
- 5000:5000
environment:
PYTHONUNBUFFERED: 1
DB_HOST: database
DB_USER: skim
DB_PASSWORD: skim-password
DB_NAME: skim
command: watchfiles skim.server.run
volumes:
- feeds:/feeds/
- ./:/skim/
tests:
depends_on:
- test-database
build:
context: .
dockerfile: Dockerfile
environment:
DB_HOST: test-database
DB_USER: skim
DB_PASSWORD: skim-password
DB_NAME: skim
volumes:
- ./:/skim/
entrypoint:
- pytest
volumes:
postgres-data:
feeds: