Created
April 14, 2024 11:58
-
-
Save askareija/160304b62f1e24c09e8247c2d9221c59 to your computer and use it in GitHub Desktop.
Caddy docker compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sets the project name. | |
name: docker-reverse-proxy | |
# The Docker services. | |
services: | |
# The Caddy server container. | |
caddy: | |
# https://hub.docker.com/_/caddy | |
image: caddy:alpine | |
container_name: caddy_reverse_proxy | |
restart: unless-stopped | |
networks: | |
- proxynet | |
# Map the app container exposed port to the host port. | |
ports: | |
# - 80:80 | |
- 443:443 | |
- ${ADMIN_API_PORT:-2019}:2019 | |
volumes: | |
- caddy_data:/data | |
- caddy_config:/config | |
# Caddy config | |
- $PWD/config/Caddyfile:/etc/caddy/Caddyfile | |
# Caddy certificate authority (CA) | |
- $PWD/certificate-authority:/data/caddy/pki/authorities/local | |
# The Docker networks. | |
networks: | |
proxynet: | |
external: true | |
# The Docker volumes. | |
volumes: | |
caddy_data: | |
driver: "local" | |
name: "${CONTAINER_VOLUME_DATA_NAME:-reverse_proxy_data}" | |
caddy_config: | |
driver: "local" | |
name: "${CONTAINER_VOLUME_CONFIG_NAME:-reverse_proxy_config}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment