-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (64 loc) · 1.65 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
version: '3'
services:
accountapi:
image: form3tech/interview-accountapi:v1.0.0-39-gef7db03d
restart: on-failure
depends_on:
- postgresql
- vault
environment:
- VAULT_ADDR=http://vault:8200
- VAULT_TOKEN=8fb95528-57c6-422e-9722-d2147bcba8ed
- PSQL_USER=root
- PSQL_PASSWORD=password
- PSQL_HOST=postgresql
- PSQL_PORT=5432
- STACK_NAME=f3-interview-accountapi
- DATABASE-HOST=postgresql
- DATABASE-SSL-MODE=disable
- DATABASE-USERNAME=interview_accountapi_user
- DATABASE-PASSWORD=123
ports:
- 8080:8080
postgresql:
image: postgres:9.5-alpine
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
volumes:
- ./scripts/db:/docker-entrypoint-initdb.d/
vault:
image: vault:1.6.3
environment:
- SKIP_SETCAP=1
- VAULT_DEV_ROOT_TOKEN_ID=8fb95528-57c6-422e-9722-d2147bcba8ed
client_unit_tests:
image: golang:1.16
depends_on:
- accountapi
volumes:
- .:/go/src/accountapi
working_dir: /go/src/accountapi/client
command: go test -v
account_unit_tests:
image: golang:1.16
depends_on:
- accountapi
volumes:
- .:/go/src/accountapi
working_dir: /go/src/accountapi/account
command: go test -v
integration_tests:
image: golang:1.16
depends_on:
- accountapi
volumes:
- .:/go/src/accountapi
working_dir: /go/src/accountapi/tests/integrations
command: go test -v