forked from slowfound/metatrader5-quant-server-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (84 loc) · 3.4 KB
/
docker-compose.yml
File metadata and controls
97 lines (84 loc) · 3.4 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
services:
traefik:
image: traefik:3.0
container_name: traefik
ports:
- 80:80 # HTTP port
- 443:443 # HTTPS port
restart: always
labels:
# Traefik configuration
traefik.enable: true
traefik.docker.network: traefik-public
traefik.http.services.traefik-dashboard.loadbalancer.server.port: 8080
# HTTP router configuration
traefik.http.routers.traefik-dashboard-http.entrypoints: http
traefik.http.routers.traefik-dashboard-http.rule: Host(`${TRAEFIK_DOMAIN?Variable not set}`)
# HTTPS router configuration
traefik.http.routers.traefik-dashboard-https.entrypoints: https
traefik.http.routers.traefik-dashboard-https.rule: Host(`${TRAEFIK_DOMAIN?Variable not set}`)
traefik.http.routers.traefik-dashboard-https.tls: true
traefik.http.routers.traefik-dashboard-https.tls.certresolver: le
traefik.http.routers.traefik-dashboard-https.service: api@internal
# HTTPS redirect middleware
traefik.http.middlewares.https-redirect.redirectscheme.scheme: https
traefik.http.middlewares.https-redirect.redirectscheme.permanent: true
traefik.http.routers.traefik-dashboard-http.middlewares: https-redirect
# HTTP Basic Auth middleware
traefik.http.middlewares.admin-auth.basicauth.users: ${TRAEFIK_USERNAME?Variable not set}:${TRAEFIK_HASHED_PASSWORD?Variable not set}
traefik.http.routers.traefik-dashboard-https.middlewares: admin-auth
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker socket for reading service labels
- traefik-public-certificates:/certificates # Certificate storage
command:
# Docker provider configuration
- --providers.docker
- --providers.docker.exposedbydefault=false
# Entrypoints configuration
- --entrypoints.http.address=:80
- --entrypoints.https.address=:443
# Let's Encrypt configuration
- --certificatesresolvers.le.acme.email=${ACME_EMAIL?Variable not set}
- --certificatesresolvers.le.acme.storage=/certificates/acme.json
- --certificatesresolvers.le.acme.tlschallenge=true
# Logging and API configuration
- --accesslog
- --log
- --api
networks:
- traefik-public # Public network for Traefik and other services
mt5:
build:
dockerfile: Dockerfile
container_name: mt5
volumes:
- ./config:/config
networks:
- traefik-public
- default
env_file:
- .env
restart: unless-stopped
labels:
# Enable Traefik for this service
traefik.enable: true
traefik.docker.network: traefik-public
# Router for vnc.mt5.${domain} (Port 3000)
traefik.http.routers.vnc-mt5-http.rule: Host(`${VNC_DOMAIN}`)
traefik.http.routers.vnc-mt5-http.entrypoints: http
traefik.http.routers.vnc-mt5-http.middlewares: https-redirect
traefik.http.routers.vnc-mt5-https.rule: Host(`${VNC_DOMAIN}`)
traefik.http.routers.vnc-mt5-https.entrypoints: https
traefik.http.routers.vnc-mt5-https.tls: true
traefik.http.routers.vnc-mt5-https.tls.certresolver: le
traefik.http.routers.vnc-mt5-https.service: vnc-mt5-service
traefik.http.services.vnc-mt5-service.loadbalancer.server.port: 3000
depends_on:
- traefik
volumes:
traefik-public-certificates: # Persistent volume for certificates
networks:
default:
driver: bridge
traefik-public:
external: true