-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
130 lines (121 loc) · 3.93 KB
/
docker-compose.yml
File metadata and controls
130 lines (121 loc) · 3.93 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
services:
#proxy:
# image: nginx:latest
# ports:
# - "8080:80"
# - "8081:443"
# volumes:
# - ./ProxyServers/Nginx/nginx.conf:/etc/nginx/nginx.conf
# secrets:
# - nginx.cert
# - nginx.key
# - dhparam.pem
# stdin_open: true
# tty: true
# depends_on:
# - ngwebui
# - apiapp
proxy:
image: traefik:latest
command:
- --log.level=INFO
- --accesslog=true
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
ports:
- "5555:80"
- "5050:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
tag: "traefik"
redis:
image: redis:alpine
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
ngwebui:
image: ${DOCKER_REGISTRY-}ngwebui
labels:
- "traefik.enable=true"
- "traefik.http.routers.ngwebui-router.rule=PathPrefix(`/`)"
- "traefik.http.routers.ngwebui-router.entrypoints=web"
- "traefik.http.services.ngwebui.loadbalancer.server.port=4200"
# CSP Middleware
- "traefik.http.routers.ngwebui.middlewares=csp-headers"
- "traefik.http.middlewares.csp-headers.headers.contentsecuritypolicy=default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'"
- "traefik.http.middlewares.csp-headers.headers.customresponseheaders.X-Frame-Options:DENY"
# Security headers
- "traefik.http.middlewares.csp-headers.headers.browserxssfilter=true"
- "traefik.http.middlewares.csp-headers.headers.customresponseheaders.X-Content-Type-Options:nosniff"
- "traefik.http.middlewares.csp-headers.headers.referrerpolicy=strict-origin-when-cross-origin"
build:
context: ./ngwebui
dockerfile: dockerfile
environment:
ENV: "dockered-nginx"
#ports:
# - "4200:4200"
volumes:
- "./ngwebui:/app"
- alpine-node-modules:/app/node_modules
depends_on:
- apiapp
apiapp:
image: ${DOCKER_REGISTRY-}apiapp
build:
context: .
dockerfile: ApiApp/Dockerfile
labels:
- "traefik.enable=true"
# SignalR Hubs Configuration
- traefik.http.routers.hubs.entrypoints=web
- traefik.http.routers.hubs.rule=PathPrefix(`/hubs/`)
- traefik.http.services.hubs.loadbalancer.server.port=8080
- traefik.http.services.hubs.loadbalancer.sticky=true
- traefik.http.services.hubs.loadbalancer.sticky.cookie.name=signalr_sticky
- "traefik.http.services.hubs.loadbalancer.sticky.cookie.secure=false"
- "traefik.http.services.hubs.loadbalancer.sticky.cookie.httpOnly=true"
environment:
- ASPNETCORE_HTTP_PORTS=8080
- redis__server__host=redis
- orchestrator__url=http://orchestrator:8080
- tmdb__api__key=${TMDB_API_KEY}
- tmdb__api__ReadAccessToken=${TMDB_API_READ_ACCESS_TOKEN}
depends_on:
redis:
condition: service_healthy
orchestrator:
image: ${DOCKER_REGISTRY-}orchestrator
build:
context: .
dockerfile: Orchestrator/Dockerfile
environment:
- ASPNETCORE_HTTP_PORTS=8080
- redis__server__host=redis
- signalr__server__url=http://apiapp:8080
- tmdb__api__key=${TMDB_API_KEY}
- tmdb__api__ReadAccessToken=${TMDB_API_READ_ACCESS_TOKEN}
depends_on:
redis:
condition: service_healthy
secrets:
nginx.cert:
file: ./ProxyServers/Certificates/selfsigned.crt
nginx.key:
file: ./ProxyServers/Certificates/selfsigned.key
dhparam.pem:
file: ./ProxyServers/Certificates/dhparam.pem
volumes:
alpine-node-modules: