-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.statamic.yaml
41 lines (37 loc) · 1.3 KB
/
docker-compose.statamic.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
version: '3.8'
networks:
shared_network:
name: shared
external: true
services:
statamic:
image: statamic:latest
networks:
- shared_network
ports:
- 8787:80
restart: unless-stopped
environment:
LEGO_CA_CERTIFICATES: "/etc/step/certs/root_ca.crt"
LEGO_CA_SERVER_NAME: "step-ca.local"
labels:
- "traefik.enable=true"
- "traefik.http.routers.statamic.rule=Host(`statamic.local`)"
- "traefik.http.routers.statamic.service=statamic@docker"
- "traefik.http.routers.statamic.entrypoints=websecure,web"
- "traefik.http.routers.statamic.tls=true"
- "traefik.http.routers.statamic.tls.certresolver=default"
- "traefik.http.routers.statamic.tls.domains[0].main=statamic.local"
- "traefik.http.services.statamic.loadbalancer.server.port=80"
# Port 80 above matches internal port, i.e. <external>:<internal> e.g. 8888:80
volumes:
# Store the Statamic source code on the VM
- statamic-root:/var/www/html
# Requires configuration
# On macOS: Download https://step-ca.local:9000/roots.pem then `step certificate install ~/Downloads/roots.pem`
# So Traefik can access Step CA's root cert (read-only)
- /etc/step:/etc/step:ro
# Use the host's SLL certificate store
- /etc/ssl/certs:/etc/ssl/certs
volumes:
statamic-root: