-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
77 lines (72 loc) · 1.78 KB
/
docker-compose.yaml
File metadata and controls
77 lines (72 loc) · 1.78 KB
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
version: "3.3"
services:
db:
image: postgres:9.6-alpine
ports:
- "5433:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=foo
app:
build:
context: .
dockerfile: cmd/server/Dockerfile
depends_on:
- db
ports:
- "3001:3001"
restart: on-failure:5
environment:
- APP_ENV=LOCAL
- GCP_PROJECT=placeholder
- PORT=3001
- API_TOKEN=e6dc8eeefd0ac7
- POSTGRES_GCP_CONNECTION_NAME=foo
- POSTGRES_ADDR=db:5432
- POSTGRES_DATABASE=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=foo
testhelpers:
build:
context: .
dockerfile: cmd/testhelpers/Dockerfile
depends_on:
- db
ports:
- "3002:3002"
restart: on-failure:5
environment:
- APP_ENV=LOCAL
- GCP_PROJECT=placeholder
- PORT=3001
- API_TOKEN=e6dc8eeefd0ac7
- POSTGRES_GCP_CONNECTION_NAME=foo
- POSTGRES_ADDR=db:5432
- POSTGRES_DATABASE=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=foo
test:
build: ./integration-tests
depends_on:
- app
- testhelpers
environment:
- API_ADDR=app:3001
- HELPERS_ADDR=testhelpers:3002
- API_TOKEN=e6dc8eeefd0ac7
# See https://github.com/dadarek/docker-wait-for-dependencies
# Run this as a separate "docker-compose" up command
start_app_dependencies:
image: dadarek/wait-for-dependencies
depends_on:
- db
command: db:5432
# See https://github.com/dadarek/docker-wait-for-dependencies
# Run this as a separate "docker-compose" up command
start_test_dependencies:
image: dadarek/wait-for-dependencies
depends_on:
- app
- testhelpers
command: app:3001 testhelpers:3002