forked from commensal/ss-xray-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (52 loc) · 1.7 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
53
54
55
56
version: "3.3"
services:
ss-xray:
image: "mazy/ss-xray:latest"
container_name: "ss-xray"
restart: unless-stopped
networks:
- default
- traefik
environment:
- PASSWORD=password
- 'PLUGIN_OPTS=server;path=/xray'
labels:
- "traefik.enable=true"
- "traefik.http.routers.ss-xray.rule=Host(`mydomain.me`)"
- "traefik.http.routers.ss-xray.entrypoints=websecure"
- "traefik.http.routers.ss-xray.tls.certresolver=le"
- "traefik.http.services.ss-xray.loadbalancer.server.port=1080"
traefik:
image: "traefik:v2.3"
container_name: "traefik"
restart: unless-stopped
command:
- "--api.insecure=true"
- "--entryPoints.metrics.address=:8082"
- "--metrics.prometheus.entryPoint=metrics"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
- "--certificatesresolvers.le.acme.tlschallenge=true"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
- "--providers.docker.network=traefik"
ports:
- "80:80"
- "443:443"
networks:
- traefik
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
extra_hosts:
- host.docker.internal:172.17.0.1
labels:
- "traefik.enable=true"
networks:
traefik:
external: true