-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
56 lines (53 loc) · 2.42 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.7"
services:
nostr-rs-relay:
container_name: nostr-rs-relay
image: scsibug/nostr-rs-relay:${RELAY_TAG}
sysctls:
net.core.somaxconn: 8128
# command:
user: "appuser"
volumes:
- "relay-db:/usr/src/app/db"
- "./config.toml:/usr/src/app/config.toml"
labels:
- "traefik.enable=true"
# - "traefik.http.routers.nostr-rs-relay.rule=(Host(`${RELAY_DOMAIN}`) && PathPrefix(`/ws`))"
- "traefik.http.routers.nostr-rs-relay.rule=(Host(`${RELAY_DOMAIN}`))"
- "traefik.http.routers.nostr-rs-relay.entrypoints=websecure"
- "traefik.http.routers.nostr-rs-relay.tls.certresolver=le"
- "traefik.http.routers.nostr-rs-relay.service=nostr-rs-relay"
- "traefik.http.services.nostr-rs-relay.loadbalancer.server.port=${RELAY_PORT}"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto = https"
# - "traefik.http.routers.nostr-rs-relay.middlewares=wss-stripprefix"
# - "traefik.http.middlewares.wss-stripprefix.stripprefix.prefixes=/wss"
# - "traefik.http.services.nostr-rs-relay.loadbalancer.sticky.cookie=true"
# - "traefik.http.services.nostr-rs-relay.loadbalancer.sticky.cookie.name=io"
# - "traefik.http.services.nostr-rs-relay.loadbalancer.sticky.cookie.httponly=true"
# - "traefik.http.services.nostr-rs-relay.loadbalancer.sticky.cookie.secure=true"
# - "traefik.http.services.nostr-rs-relay.loadbalancer.sticky.cookie.samesite=io"
traefik:
image: traefik:${TRAEFIK_TAG}
container_name: traefik
ports:
- 80:80
- 443:443
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
command:
- "--log.level=${TRAEFIK_LOGLEVEL}"
- "--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.web.http.redirections.entrypoint.permanent=true"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.le.acme.httpchallenge=true"
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.le.acme.email=${TRAEFIK_ACME_EMAIL}"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
restart: always
volumes:
relay-db: {}