-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
96 lines (91 loc) · 2.52 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
services:
db:
image: postgres:15.2 # keep in sync with docker-compose-test
restart: unless-stopped
volumes:
- ./data/db:/var/lib/postgresql/data
networks:
localcert-net:
ipv4_address: 10.33.44.1
environment:
- POSTGRES_DB=unused
- POSTGRES_PASSWORD
- POSTGRES_USER
pdns:
build: pdns
restart: unless-stopped
ports:
- "53:53/udp"
environment:
- LOCALCERT_PDNS_DB_NAME
- LOCALCERT_PDNS_DEFAULT_SOA_CONTENT
- LOCALCERT_PDNS_HOST
- LOCALCERT_PDNS_WEBSERVER_ALLOW_FROM
- LOCALCERT_SHARED_PDNS_API_KEY
- POSTGRES_PASSWORD
- POSTGRES_USER
networks:
localcert-net:
ipv4_address: 10.33.44.2
depends_on:
- db
web:
build: localcert
restart: unless-stopped
environment:
- LOCALCERT_PDNS_NS1
- LOCALCERT_PDNS_NS2
- LOCALCERT_SHARED_PDNS_API_KEY
- LOCALCERT_WEB_ACCOUNT_DEFAULT_HTTP_PROTOCOL
- LOCALCERT_WEB_DB_NAME
- LOCALCERT_WEB_DEBUG
- LOCALCERT_WEB_DJANGO_SECRET_KEY
- LOCALCERT_WEB_GITHUB_CLIENT_ID
- LOCALCERT_WEB_GITHUB_SECRET
- LOCALCERT_WEB_PDNS_API_PORT
- LOCALCERT_WEB_PDNS_DNS_PORT
- LOCALCERT_WEB_PDNS_HOST
- LOCALCERT_WEB_PGSQL_HOST
- POSTGRES_PASSWORD
- POSTGRES_USER
networks:
localcert-net:
ipv4_address: 10.33.44.3
depends_on:
- db
- pdns
labels:
- "traefik.enable=true"
- "traefik.http.routers.localcert-web.rule=(Host(`console.getlocalcert.net`)) || (Host(`api.getlocalcert.net`) && PathPrefix(`/api/`))"
- "traefik.http.routers.localcert-web.tls=true"
- "traefik.http.routers.localcert-web.tls.certresolver=myresolver"
- "traefik.http.services.localcert-web.loadbalancer.server.port=80"
- "traefik.docker.network=localcert-net"
- "traefik.http.routers.localcert-web.entryPoints=websecure"
reverse-proxy:
image: traefik:v2.9
restart: unless-stopped
ports:
- "80:80" # KEEP: needed for Let's Encrypt
- "443:443"
volumes:
- ./traefik.yml:/etc/traefik/traefik.yml:ro
- /var/run/docker.sock:/var/run/docker.sock
- ./acme.json:/acme.json
networks:
localcert-net:
ipv4_address: 10.33.44.4
default:
depends_on:
- web
networks:
localcert-net:
name: localcert-net
external: false
internal: false
ipam:
driver: default
config:
- subnet: 10.33.44.0/24
ip_range: 10.33.44.0/26
gateway: 10.33.44.254