-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (69 loc) · 2.02 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
version: "3.9"
services:
web:
build: .
image: scribly/scribly
ports:
- "8000:8000"
volumes:
# for a hack where cypress dumps email html bodies into /static to interact with emails
# as a workaround for: https://github.com/cypress-io/cypress/issues/2918
- "./static:/project/static"
environment:
DATABASE_URL: postgres://scribly:pass@db/scribly?sslmode=disable
WEBSITE_URL: http://127.0.0.1:8000
SENDGRID_BASE_URL: http://mocksendgrid:1080
command: >
bash -c "
./wait-for-it.sh db:5432
./wait-for-it.sh mocksendgrid:1080
sqitch deploy db:$${DATABASE_URL} && go run ./cmd/site/
"
migrations:
image: sqitch/sqitch
command: deploy db:postgres://scribly:pass@db/scribly?sslmode=disable
working_dir: /project
volumes:
- type: bind
source: "."
target: "/project"
read_only: true
# scribbot:
# build: .
# image: scribly/scribly
# command: /bin/scribbot
# environment:
# DATABASE_URL: postgres://scribly:pass@db/scribly?sslmode=disable
# WEBSITE_URL: http://127.0.0.1:8000
# SENDGRID_BASE_URL: http://mocksendgrid:1080
# OPENAI_BASE_URL: http://mockopenai:1080
db:
image: postgres:latest
ports:
- "5432:5432"
environment:
POSTGRES_USER: scribly
POSTGRES_PASSWORD: pass
POSTGRES_DB: scribly
volumes:
- pgdata:/var/lib/postgresql/data
mocksendgrid:
image: mockserver/mockserver:mockserver-5.15.0
environment:
MOCKSERVER_INITIALIZATION_JSON_PATH: /config/mocksendgrid.json
MOCKSERVER_LOG_LEVEL: "WARNING"
ports:
- "9991:1080"
volumes:
- "./mocksendgrid.json:/config/mocksendgrid.json"
mockopenai:
image: mockserver/mockserver:mockserver-5.15.0
environment:
MOCKSERVER_INITIALIZATION_JSON_PATH: /config/mockopenai.json
MOCKSERVER_LOG_LEVEL: "WARNING"
ports:
- "9992:1080"
volumes:
- "./mockopenai.json:/config/mockopenai.json"
volumes:
pgdata: