-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
101 lines (89 loc) · 1.95 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: '3.7'
x-kaori:
&kaori
build:
context: .
target: production
cache_from:
- ${CACHE_FROM_IMAGE:-austinpray/kaori/kaori:master}
- austinpray/kaori/debug
- austinpray/kaori/kaori
image: austinpray/kaori/kaori
env_file: .env
environment:
DATABASE_URL: postgresql://kaori:kaori@db:5432/kaori
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672/%2F
volumes:
- .:/app
x-db:
&db
image: postgres
environment:
POSTGRES_DB: kaori
POSTGRES_PASSWORD: kaori
POSTGRES_USER: kaori
services:
db:
<<: *db
volumes:
- "/var/lib/postgresql/data"
ports:
- "4444:5432"
db-test:
<<: *db
ports:
- "5555:5432"
rabbitmq:
image: rabbitmq
rabbitmq-test:
image: rabbitmq
worker:
<<: *kaori
command: ["dramatiq-gevent", "kaori.worker", "-p", "2", "-t", "8"]
restart: on-failure
depends_on:
- db
- rabbitmq
api:
<<: *kaori
command: ["gunicorn", "--config", "python:config.gunicorn_api", "kaori.api:app"]
restart: on-failure
depends_on:
- db
- rabbitmq
ports:
- 8001:8001
test: &test
<<: *kaori
image: austinpray/kaori/debug
environment:
DATABASE_URL: postgresql://kaori:kaori@db-test:5432/kaori
RABBITMQ_URL: amqp://guest:guest@rabbitmq-test:5672/%2F
build:
context: .
target: development
cache_from:
- ${CACHE_FROM_IMAGE:-austinpray/kaori/kaori:master}
- austinpray/kaori/debug
- austinpray/kaori/kaori
command: ["pytest"]
gsim:
<<: *test
entrypoint: ["bin/gsim"]
command: ["cards"]
gweb:
<<: *test
working_dir: /www
volumes:
- ./kaori/plugins/gacha/static:/www:ro
command: ["python", "-m", "http.server"]
ports:
- 8080:8000
img:
<<: *test
working_dir: /www
volumes:
- ./static/tmp/img:/www:ro
command: ["python", "-m", "http.server"]
ports:
- 8081:8000