-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (54 loc) · 1.45 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
version: '3'
services:
accountapi:
image: form3tech/interview-accountapi:v1.0.0-4-g63cf8434
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/
tests:
build: .
links:
- accountapi
depends_on:
- accountapi
volumes:
- .:/go/src/github.com/form3/interview-accountapi
working_dir: /go/src/github.com/form3/interview-accountapi
environment:
- ACCOUNT_API_ADDR=http://accountapi:8080
command: >
bash -c "go get ./... &&
go test --cover -v -tags integration ./..."
vault:
image: vault:0.9.3
environment:
- SKIP_SETCAP=1
- VAULT_DEV_ROOT_TOKEN_ID=8fb95528-57c6-422e-9722-d2147bcba8ed