docs(docker): More compose cleanups

* Stringify and use long URLs for image names
* Use read-only docker socket in traefik mount
* Shorten some comments
This commit is contained in:
stratself
2026-04-16 10:48:26 +00:00
committed by Ellis Git
parent e44ae3bac9
commit 91f2900463
10 changed files with 27 additions and 31 deletions
@@ -2,7 +2,7 @@
services: services:
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -38,7 +38,6 @@ volumes:
db: db:
networks: networks:
# This is the network Traefik listens to, if your network has a different # This must match the network name that Traefik listens on
# name, don't forget to change it here and in the docker-compose.override.yml
proxy: proxy:
external: true external: true
@@ -4,7 +4,7 @@ services:
caddy: caddy:
# This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity! # This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity!
# For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy # For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy
image: lucaslorentz/caddy-docker-proxy:ci-alpine image: "docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine"
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
@@ -21,7 +21,7 @@ services:
caddy.reverse_proxy: /.well-known/matrix/* homeserver:8008 caddy.reverse_proxy: /.well-known/matrix/* homeserver:8008
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -2,7 +2,7 @@
services: services:
caddy: caddy:
image: docker.io/caddy:latest image: "docker.io/caddy:latest"
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
@@ -16,7 +16,7 @@ services:
target: /etc/caddy/Caddyfile target: /etc/caddy/Caddyfile
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -52,6 +52,6 @@ configs:
https://matrix.example.com:443 { https://matrix.example.com:443 {
reverse_proxy http://homeserver:8008 reverse_proxy http://homeserver:8008
} }
https://example.com { https://example.com:443 {
reverse_proxy /.well-known/matrix* http://homeserver:8008 reverse_proxy /.well-known/matrix* http://homeserver:8008
} }
@@ -2,7 +2,7 @@
services: services:
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -32,14 +32,14 @@ services:
} }
traefik: traefik:
image: "traefik:latest" image: "docker.io/traefik:latest"
container_name: "traefik" container_name: "traefik"
restart: "unless-stopped" restart: "unless-stopped"
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock:z" - "/var/run/docker.sock:/var/run/docker.sock:ro"
- "acme:/etc/traefik/acme" - "acme:/etc/traefik/acme"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
@@ -52,6 +52,7 @@ services:
- "traefik.http.routers.redirs.middlewares=redirect-to-https" - "traefik.http.routers.redirs.middlewares=redirect-to-https"
environment: environment:
TRAEFIK_LOG_LEVEL: DEBUG TRAEFIK_LOG_LEVEL: DEBUG
TRAEFIK_ENTRYPOINTS_WEB: true TRAEFIK_ENTRYPOINTS_WEB: true
TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: ":80" TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: ":80"
@@ -2,7 +2,7 @@
services: services:
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -38,7 +38,6 @@ volumes:
db: db:
networks: networks:
# This is the network Traefik listens to, if your network has a different # This must match the network name that Traefik listens on
# name, don't forget to change it here and in the docker-compose.override.yml
proxy: proxy:
external: true external: true
@@ -4,7 +4,7 @@ services:
homeserver: homeserver:
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network - "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network
- "traefik.http.routers.to-continuwuity.rule=Host(`example.com`)" # Change to the address on which Continuwuity is hosted - "traefik.http.routers.to-continuwuity.rule=Host(`example.com`)" # Change to the address on which Continuwuity is hosted
- "traefik.http.routers.to-continuwuity.tls=true" - "traefik.http.routers.to-continuwuity.tls=true"
@@ -14,13 +14,10 @@ services:
# This must match with CONTINUWUITY_PORT (default: 8008) # This must match with CONTINUWUITY_PORT (default: 8008)
- "traefik.http.services.to_continuwuity.loadbalancer.server.port=8008" - "traefik.http.services.to_continuwuity.loadbalancer.server.port=8008"
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowOriginList=*"
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowHeaders=Origin, X-Requested-With, Content-Type, Accept, Authorization"
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowMethods=GET, POST, PUT, DELETE, OPTIONS"
# If you want to have your account on <DOMAIN>, but host Continuwuity on a subdomain, # If you want to have your account on <DOMAIN>, but host Continuwuity on a subdomain,
# you can let it only handle the well known file on that domain instead # you can let it only handle the well known file on the base domain instead
#- "traefik.http.routers.to-matrix-wellknown.rule=Host(`example.com`) && PathPrefix(`/.well-known/matrix`)" #
# - "traefik.http.routers.to-matrix-wellknown.rule=Host(`example.com`) && PathPrefix(`/.well-known/matrix`)"
#- "traefik.http.routers.to-matrix-wellknown.tls=true" #- "traefik.http.routers.to-matrix-wellknown.tls=true"
#- "traefik.http.routers.to-matrix-wellknown.tls.certresolver=letsencrypt" #- "traefik.http.routers.to-matrix-wellknown.tls.certresolver=letsencrypt"
#- "traefik.http.routers.to-matrix-wellknown.middlewares=cors-headers@docker" #- "traefik.http.routers.to-matrix-wellknown.middlewares=cors-headers@docker"
@@ -4,7 +4,7 @@ services:
caddy: caddy:
# This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity! # This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity!
# For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy # For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy
image: lucaslorentz/caddy-docker-proxy:ci-alpine image: "docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine"
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
@@ -18,7 +18,7 @@ services:
restart: unless-stopped restart: unless-stopped
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -2,7 +2,7 @@
services: services:
caddy: caddy:
image: docker.io/caddy:latest image: "docker.io/caddy:latest"
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
@@ -17,7 +17,7 @@ services:
target: /etc/caddy/Caddyfile target: /etc/caddy/Caddyfile
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -51,6 +51,6 @@ volumes:
configs: configs:
Caddyfile: Caddyfile:
content: | content: |
https://example.com, https://example.com:8448 { https://example.com:443, https://example.com:8448 {
reverse_proxy http://homeserver:8008 reverse_proxy http://homeserver:8008
} }
@@ -2,7 +2,7 @@
services: services:
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -32,14 +32,14 @@ services:
} }
traefik: traefik:
image: "traefik:latest" image: "docker.io/traefik:latest"
container_name: "traefik" container_name: "traefik"
restart: "unless-stopped" restart: "unless-stopped"
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock:z" - "/var/run/docker.sock:/var/run/docker.sock:ro"
- "acme:/etc/traefik/acme" - "acme:/etc/traefik/acme"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
@@ -52,6 +52,7 @@ services:
- "traefik.http.routers.redirs.middlewares=redirect-to-https" - "traefik.http.routers.redirs.middlewares=redirect-to-https"
environment: environment:
TRAEFIK_LOG_LEVEL: DEBUG TRAEFIK_LOG_LEVEL: DEBUG
TRAEFIK_ENTRYPOINTS_WEB: true TRAEFIK_ENTRYPOINTS_WEB: true
TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: ":80" TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: ":80"
+1 -2
View File
@@ -2,7 +2,7 @@
services: services:
homeserver: homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
ports: ports:
@@ -26,6 +26,5 @@ services:
# server=example.com:443 # server=example.com:443
# } # }
volumes: volumes:
db: db: