-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.76 KB
/
docker-compose.yml
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
49
50
51
52
version: "3.7"
services:
traefik:
image: "traefik"
restart: always
command:
- "--api=true"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
- "--certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}"
- "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
ports:
- "8080:80"
- "9443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
site:
depends_on:
- traefik
env_file:
- .env
ports:
- "3333:3000"
labels:
- traefik.enable=true
- traefik.http.routers.site.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
- traefik.http.routers.site.tls=true
- traefik.http.routers.site.entrypoints=web,websecure
- traefik.http.routers.site.tls.certresolver=mytlschallenge
- traefik.http.middlewares.site.headers.SSLRedirect=true
- traefik.http.middlewares.site.headers.STSSeconds=315360000
- traefik.http.middlewares.site.headers.browserXSSFilter=true
- traefik.http.middlewares.site.headers.contentTypeNosniff=true
- traefik.http.middlewares.site.headers.forceSTSHeader=true
- traefik.http.middlewares.site.headers.SSLHost=${DOMAIN_NAME}
- traefik.http.middlewares.site.headers.STSIncludeSubdomains=true
- traefik.http.middlewares.site.headers.STSPreload=true
build:
dockerfile: Dockerfile
context: .
volumes:
traefik_data: