-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (83 loc) · 1.78 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
version: '2.1'
networks:
db-tier:
app-tier:
test-tier:
services:
database:
image: postgres:10.1-alpine
environment:
POSTGRES_PASSWORD: wailing
POSTGRES_USER: wailing
POSTGRES_DB: wailing
volumes:
- postgres:/var/lib/postgresql/data
restart: always
ports:
- "5432:5432"
networks:
- db-tier
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 10s
retries: 3
wailingbot:
build:
context: .
dockerfile: Dockerfile
image: sermilrod/slack-wailingbot:latest
command: /wailingbot
environment:
WW_PORT: 3000
WW_SLACK_TOKEN: "${WW_SLACK_TOKEN}"
WW_PG_USER: wailing
WW_PG_DBNAME: wailing
WW_PG_PASSWORD: wailing
WW_PG_HOST: database
WW_ADD_CMD: /wwadd
WW_GET_CMD: /wwget
ports:
- "3000:3000"
networks:
- db-tier
- app-tier
depends_on:
database:
condition: service_healthy
integration_tests:
build:
context: .
dockerfile: Dockerfile-tests
environment:
WW_PORT: 3000
WW_SLACK_TOKEN: "${WW_SLACK_TOKEN}"
WW_PG_USER: wailing
WW_PG_DBNAME: wailing
WW_PG_PASSWORD: wailing
WW_PG_HOST: database
WW_ADD_CMD: /wwadd
WW_GET_CMD: /wwget
networks:
- db-tier
- test-tier
depends_on:
wailingbot:
condition: service_started
unit_tests:
build:
context: .
dockerfile: Dockerfile-tests
environment:
WW_PORT: 3000
WW_SLACK_TOKEN: "${WW_SLACK_TOKEN}"
WW_PG_USER: wailing
WW_PG_DBNAME: wailing
WW_PG_PASSWORD: wailing
WW_PG_HOST: database
WW_ADD_CMD: /wwadd
WW_GET_CMD: /wwget
networks:
- test-tier
volumes:
postgres: