forked from noxious/server
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
45964ba7f3 | |||
e7e187da7c | |||
64c0d82d48 | |||
12292ea4f2 | |||
0c8df9d175 | |||
86cbe3fdcb |
@ -25,4 +25,9 @@ DEFAULT_CHARACTER_POS_Y="0"
|
|||||||
SMTP_HOST=my.directonline.io
|
SMTP_HOST=my.directonline.io
|
||||||
SMTP_PORT=587
|
SMTP_PORT=587
|
||||||
SMTP_USER=no-reply@noxious.gg
|
SMTP_USER=no-reply@noxious.gg
|
||||||
SMTP_PASSWORD=""
|
SMTP_PASSWORD=""
|
||||||
|
|
||||||
|
# Traefik configuration
|
||||||
|
ACME_EMAIL=info@noxious.gg
|
||||||
|
TRAEFIK_DASHBOARD_HOST=traefik.server.noxious.gg
|
||||||
|
TRAEFIK_BASIC_AUTH=admin:$apr1$42pa8hen$p.bKJ3.gHJ9U0ZwyVxmIc0
|
0
certificates/acme.json
Normal file
0
certificates/acme.json
Normal file
33
config/traefik.yml
Normal file
33
config/traefik.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
entryPoints:
|
||||||
|
web:
|
||||||
|
address: ":80"
|
||||||
|
http:
|
||||||
|
redirections:
|
||||||
|
entryPoint:
|
||||||
|
to: websecure
|
||||||
|
scheme: https
|
||||||
|
websecure:
|
||||||
|
address: ":443"
|
||||||
|
http:
|
||||||
|
tls:
|
||||||
|
certResolver: letsencrypt
|
||||||
|
|
||||||
|
certificatesResolvers:
|
||||||
|
letsencrypt:
|
||||||
|
acme:
|
||||||
|
email: info@noxious.gg
|
||||||
|
storage: /certificates/acme.json
|
||||||
|
httpChallenge:
|
||||||
|
entryPoint: web
|
||||||
|
|
||||||
|
providers:
|
||||||
|
docker:
|
||||||
|
endpoint: "unix:///var/run/docker.sock"
|
||||||
|
exposedByDefault: false
|
||||||
|
network: app-network
|
||||||
|
|
||||||
|
log:
|
||||||
|
level: INFO
|
||||||
|
|
||||||
|
api:
|
||||||
|
dashboard: false
|
@ -38,22 +38,9 @@ services:
|
|||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.app.rule=Host(`${HOST}`)"
|
- "traefik.http.routers.app.rule=Host(`${HOST}`)"
|
||||||
- "traefik.http.routers.app.entrypoints=websecure"
|
- "traefik.http.routers.app.entrypoints=websecure"
|
||||||
- "traefik.http.routers.app.tls.certresolver=le"
|
- "traefik.http.routers.app.tls=true"
|
||||||
|
- "traefik.http.routers.app.service=app"
|
||||||
- "traefik.http.services.app.loadbalancer.server.port=${PORT}"
|
- "traefik.http.services.app.loadbalancer.server.port=${PORT}"
|
||||||
- "traefik.http.routers.app.middlewares=websocket"
|
|
||||||
|
|
||||||
traefik:
|
|
||||||
image: traefik:v3.3.3
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
- "8080:8080"
|
|
||||||
volumes:
|
|
||||||
- traefik_data:/data
|
|
||||||
- ./traefik.toml:/etc/traefik/traefik.toml
|
|
||||||
restart: unless-stopped
|
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
image: mariadb:lts
|
image: mariadb:lts
|
||||||
@ -82,6 +69,19 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
|
||||||
|
traefik:
|
||||||
|
image: traefik:v3.3.3
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
- ./config/traefik.yml:/etc/traefik/traefik.yml:ro
|
||||||
|
- ./certificates:/certificates
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
app-network:
|
app-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
@ -90,5 +90,4 @@ volumes:
|
|||||||
app-public:
|
app-public:
|
||||||
app-logs:
|
app-logs:
|
||||||
mariadb-data:
|
mariadb-data:
|
||||||
redis-data:
|
redis-data:
|
||||||
traefik_data:
|
|
59
traefik.toml
59
traefik.toml
@ -1,59 +0,0 @@
|
|||||||
[entryPoints]
|
|
||||||
[entryPoints.web]
|
|
||||||
address = ":80"
|
|
||||||
[entryPoints.web.http.redirections.entryPoint]
|
|
||||||
to = "websecure"
|
|
||||||
scheme = "https"
|
|
||||||
|
|
||||||
[entryPoints.websecure]
|
|
||||||
address = ":443"
|
|
||||||
|
|
||||||
[providers.docker]
|
|
||||||
endpoint = "unix:///var/run/docker.sock"
|
|
||||||
exposedByDefault = false
|
|
||||||
|
|
||||||
[certificatesResolvers.le.acme]
|
|
||||||
email = "your-email@example.com"
|
|
||||||
storage = "/data/acme.json"
|
|
||||||
[certificatesResolvers.le.acme.tlsChallenge]
|
|
||||||
|
|
||||||
[api]
|
|
||||||
dashboard = true
|
|
||||||
|
|
||||||
[ping] # Health check
|
|
||||||
entryPoint = "websecure"
|
|
||||||
|
|
||||||
[http.routers.api]
|
|
||||||
rule = "PathPrefix(`/api`)"
|
|
||||||
service = "api"
|
|
||||||
entryPoints = ["websecure"]
|
|
||||||
|
|
||||||
[http.services.api.loadBalancer]
|
|
||||||
[[http.services.api.loadBalancer.servers]]
|
|
||||||
url = "http://app:${PORT}"
|
|
||||||
|
|
||||||
# Added for websocket
|
|
||||||
[http.services.app.loadBalancer]
|
|
||||||
sticky = true
|
|
||||||
[[http.services.app.loadBalancer.servers]]
|
|
||||||
url = "http://app:${PORT}"
|
|
||||||
|
|
||||||
# Added for websocket
|
|
||||||
[http.routers.app]
|
|
||||||
rule = "Host(`${HOST}`)"
|
|
||||||
entrypoints = ["websecure"]
|
|
||||||
service = "app"
|
|
||||||
|
|
||||||
[http.routers.app.tls]
|
|
||||||
certresolver = "le"
|
|
||||||
|
|
||||||
[http.routers.app.middlewares]
|
|
||||||
# Enable websockets
|
|
||||||
- "websocket"
|
|
||||||
|
|
||||||
[http.middlewares]
|
|
||||||
[http.middlewares.websocket.headers]
|
|
||||||
accessControlAllowHeaders = ["Origin", "Content-Type", "Accept", "Authorization"]
|
|
||||||
accessControlAllowMethods = ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
|
|
||||||
accessControlAllowOrigin = ["*"]
|
|
||||||
accessControlExposeHeaders = ["Content-Length", "Content-Range"]
|
|
Reference in New Issue
Block a user