-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (47 loc) · 1.34 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
version: '2.4'
services:
db:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: credadmin
POSTGRES_PASSWORD: admin_cred_access
POSTGRES_DB: credadmin
labels:
- "traefik.tcp.services.postgres.loadbalancer.server.port=5432"
- "traefik.tcp.routers.postgres.rule=HostSNI(`*`)"
- "traefik.tcp.routers.postgres.entrypoints=postgres"
- "traefik.tcp.routers.postgres.service=postgres"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U credadmin -d credadmin"]
interval: 10s
timeout: 5s
retries: 5
reverse-proxy:
image: traefik:v2.0
ports:
- "80:80"
- "443:443"
- "5432:5432"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- $HOME/certs:/data/traefik:ro
- ./traefik:/etc/traefik:ro
cred-admin:
build: .
environment:
CA_DB_CONNECTION_URL: 'postgres://credadmin:admin_cred_access@db:5432/credadmin'
OIDC_ISSUER_URL: $OIDC_ISSUER_URL
PUBLIC_URL: https://credadmin.127.0.0.1.nip.io
expose:
- "3000"
labels:
- "traefik.http.routers.whoami.rule=Host(`credadmin.127.0.0.1.nip.io`)"
- "traefik.http.routers.whoami.tls=true"
depends_on:
db:
condition: service_healthy
volumes:
postgres_data: