-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
compose.yaml
48 lines (43 loc) · 1.38 KB
/
compose.yaml
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
#--------------------------------------------------------------------------
# ! The Docker Compose file is configured for local environments.
# ! Do not deploy the Caddy Docker Compose file in production environments.
#--------------------------------------------------------------------------
# Docker compose version - https://docs.docker.com/compose/compose-file
version: "3.9"
# 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: ${CONTAINER_NAME:-reverse_proxy}
restart: unless-stopped
networks:
- reverse_proxy
# 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:
reverse_proxy:
driver: "bridge"
name: ${NETWORK_NAME:-reverse_proxy}
# 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}"