This repository has been archived by the owner on May 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (96 loc) · 2.89 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: "3.4"
services:
apiserver:
container_name: expected-apiserver
restart: on-failure
build:
context: .
dockerfile: cmd/expected-apiserver/Dockerfile
environment:
- "POSTGRES_ADDR=${POSTGRES_ADDR:-postgres://expected:expected@postgres/expected?sslmode=disable}"
- "STAN_ADDR=${STAN_ADDR:-nats://stan:4222}"
depends_on:
- postgres
- stan
ports:
- 3000:3000
registryhook:
container_name: expected-registryhook
restart: on-failure
build:
context: .
dockerfile: cmd/expected-registryhook/Dockerfile
environment:
- "REGISTRY_URL=http://registry:5000"
- "AUTH_ADDR=authserver:4000"
- "POSTGRES_ADDR=${POSTGRES_ADDR:-postgres://expected:expected@postgres/expected?sslmode=disable}"
- "STAN_ADDR=${STAN_ADDR:-nats://stan:4222}"
- "CERTS_PUBLIC_KEY=/certs/server.crt"
- "CERTS_PRIVATE_KEY=/certs/server.key"
depends_on:
- postgres
- stan
- authserver
ports:
- 3001:3000
volumes:
- ./certs:/certs
authserver:
container_name: expected-authserver
restart: on-failure
build:
context: .
dockerfile: cmd/expected-authserver/Dockerfile
environment:
- "POSTGRES_ADDR=${POSTGRES_ADDR:-postgres://expected:expected@postgres/expected?sslmode=disable}"
- "GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}"
- "GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}"
- "CERTS_PUBLIC_KEY=/certs/server.crt"
- "CERTS_PRIVATE_KEY=/certs/server.key"
- "DASHBOARD_URL=${DASHBOARD_URL:-http://localhost:8080}"
depends_on:
- postgres
ports:
- 3002:3000
- 4001:4000
volumes:
- ./certs:/certs
registry:
container_name: expected-registry
restart: on-failure
image: registry:latest
environment:
- "REGISTRY_STORAGE_DELETE_ENABLED=true"
- "REGISTRY_AUTH=token"
- "REGISTRY_AUTH_TOKEN_REALM=${REGISTRY_AUTH_TOKEN_REALM:-http://localhost:3002/auth/registry}"
- "REGISTRY_AUTH_TOKEN_SERVICE=registry"
- "REGISTRY_AUTH_TOKEN_ISSUER=auth_registry"
- "REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/certs/server.crt"
- "REGISTRY_AUTH_TOKEN_AUTOREDIRECT=false"
- "REGISTRY_NOTIFICATIONS_ENDPOINTS=- name: expected-hook\n url: ${REGISTRY_AUTH_SERVER:-http://registryhook:3000/hook}\n timeout: 10s\n threshold: 8\n backoff: 10s"
depends_on:
- registryhook
ports:
- 5000:5000
volumes:
- ./certs:/certs
postgres:
container_name: expected-postgres
image: postgres:alpine
restart: on-failure
environment:
- "POSTGRES_USER=expected"
- "POSTGRES_PASSWORD=expected"
- "TZ=Europe/Paris"
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
stan:
container_name: expected-stan
image: nats-streaming
restart: on-failure
ports:
- 4222:4222
volumes:
postgres: {}