Compare commits
2 Commits
da3aa5fa0d
...
203e51c576
| Author | SHA1 | Date | |
|---|---|---|---|
| 203e51c576 | |||
| 5ce1ddec1a |
13
caddy-docker-proxy/Caddyfile
Normal file
13
caddy-docker-proxy/Caddyfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# https://caddyserver.com/docs/metrics
|
||||||
|
:9000 {
|
||||||
|
metrics
|
||||||
|
}
|
||||||
|
|
||||||
|
subdomain.domain.tld {
|
||||||
|
reverse_proxy ${local_ip}:${port}
|
||||||
|
# https://caddyserver.com/docs/caddyfile/directives/basic_auth
|
||||||
|
basic_auth {
|
||||||
|
Username hashed_password
|
||||||
|
}
|
||||||
|
log
|
||||||
|
}
|
||||||
59
caddy-docker-proxy/docker-compose.yml
Normal file
59
caddy-docker-proxy/docker-compose.yml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
---
|
||||||
|
x-logging:
|
||||||
|
&default-logging
|
||||||
|
driver: syslog
|
||||||
|
options:
|
||||||
|
# This requires two files in /etc/rsyslog.d
|
||||||
|
# https://www.loggly.com/use-cases/docker-syslog-logging-and-troubleshooting/
|
||||||
|
tag: "container_name/{{.Name}}"
|
||||||
|
labels: "${hostname}"
|
||||||
|
syslog-facility: # cron, local7, etc.
|
||||||
|
|
||||||
|
# Can be removed if not needed
|
||||||
|
x-opt-values:
|
||||||
|
&volume-opt
|
||||||
|
driver_opts: &options
|
||||||
|
type: "nfs"
|
||||||
|
o: "addr=${IP},rw"
|
||||||
|
|
||||||
|
services:
|
||||||
|
caddy:
|
||||||
|
image: lucaslorentz/caddy-docker-proxy:ci-alpine
|
||||||
|
container_name: caddy
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
caddy.email: ${CADDY_EMAIL}
|
||||||
|
environment:
|
||||||
|
# $ docker network create caddy
|
||||||
|
CADDY_INGRESS_NETWORKS: caddy
|
||||||
|
CADDY_DOCKER_CADDYFILE_PATH: "/etc/caddy/Caddyfile"
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 443:443
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
- caddy_data:/data
|
||||||
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||||
|
networks:
|
||||||
|
- caddy
|
||||||
|
ulimits:
|
||||||
|
nofile: 65535
|
||||||
|
logging: *default-logging
|
||||||
|
|
||||||
|
networks:
|
||||||
|
caddy:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
caddy_data: {}
|
||||||
|
|
||||||
|
# What if I want to use the x-opt-values:
|
||||||
|
# acme:
|
||||||
|
# <<: *volume-opt
|
||||||
|
# driver_opts:
|
||||||
|
# <<: *options
|
||||||
|
# device: ":/mnt/path/nginx-proxy/acme"
|
||||||
|
# o: "new_opts"
|
||||||
|
# type: "new_type"
|
||||||
|
#
|
||||||
|
# 'o' and 'type' can be redifined again or left at default
|
||||||
@ -1 +0,0 @@
|
|||||||
COMPOSE_PROJECT_NAME=pmb
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
x-logging:
|
|
||||||
&default-logging
|
|
||||||
driver: local
|
|
||||||
options:
|
|
||||||
max-size: "1m"
|
|
||||||
max-file: "50"
|
|
||||||
|
|
||||||
x-opt-values:
|
|
||||||
&volume-opt
|
|
||||||
driver_opts: &options
|
|
||||||
type: "nfs"
|
|
||||||
o: "addr=${IP},rw"
|
|
||||||
|
|
||||||
services:
|
|
||||||
protonmail-bridge:
|
|
||||||
image: shenxn/protonmail-bridge
|
|
||||||
container_name: protonmail-bridge
|
|
||||||
restart: always
|
|
||||||
volumes:
|
|
||||||
- protonmail:/root
|
|
||||||
networks:
|
|
||||||
- protonmail
|
|
||||||
logging: *default-logging
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
protonmail:
|
|
||||||
<<: *volume-opt
|
|
||||||
driver_opts:
|
|
||||||
<<: *options
|
|
||||||
device: ":/mnt/path/protonmail/protonmail"
|
|
||||||
|
|
||||||
networks:
|
|
||||||
protonmail:
|
|
||||||
Loading…
x
Reference in New Issue
Block a user