forked from form3tech-oss/interview-accountapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (57 loc) · 1.51 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
version: '3'
services:
client-tests:
image: golang:1.20.1-alpine3.17
restart: "no"
depends_on:
- accountapi
command: sh -c "pwd && go version && go test"
volumes:
- .:/app
working_dir: /app
environment:
- ACCOUNTS_SERVICE_BASE_URL=http://accountapi:8080
accountapi:
image: form3tech/interview-accountapi:v1.0.0-46-gb3b6c766
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"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 60s
retries: 5
timeout: 10s
start_period: 20s
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