57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
# ========================================================
|
|
# GsDChat Deployment with Cloudflare Tunnel (cloudflared)
|
|
# ========================================================
|
|
# Usage:
|
|
# 1. Fill in CLOUDFLARE_TUNNEL_TOKEN in your .env file.
|
|
# 2. In your Cloudflare Zero Trust dashboard (Networks -> Tunnels):
|
|
# Route your public hostname (e.g. chat.yourdomain.com) to:
|
|
# Type: HTTP
|
|
# URL: gsdchat:5000
|
|
# 3. Deploy:
|
|
# docker compose -f docker-compose.tunnel.yml up -d --build
|
|
# ========================================================
|
|
|
|
services:
|
|
gsdchat:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: gsdchat-server
|
|
restart: unless-stopped
|
|
# The server runs in an internal, closed-off docker network.
|
|
# No ports need to be publicly exposed on the host machine.
|
|
# (Optional: uncomment the line below to allow local access on the host)
|
|
# ports:
|
|
# - "127.0.0.1:5000:5000"
|
|
environment:
|
|
- GSDCHAT_PORT=5000
|
|
- GSDCHAT_HOST=0.0.0.0
|
|
- GSDCHAT_SERVER_NAME=${SERVER_NAME:-GsDChat Community Server}
|
|
- GSDCHAT_MOTD=${SERVER_MOTD:-Welcome to GsDChat! Enjoy private and modular messaging.}
|
|
- GSDCHAT_SERVER_PASSWORD=${SERVER_PASSWORD:-}
|
|
- GSDCHAT_REGISTRATION_MODE=${REGISTRATION_MODE:-Open}
|
|
- GSDCHAT_MAX_FILE_SIZE_MB=${MAX_FILE_SIZE_MB:-50}
|
|
- GSDCHAT_USE_TLS=false
|
|
- GSDCHAT_DATA_DIR=/app/data
|
|
- GSDCHAT_MODS_DIR=/app/mods
|
|
volumes:
|
|
- ./data:/app/data
|
|
- ./mods:/app/mods
|
|
networks:
|
|
- gsdchat-net
|
|
|
|
cloudflared:
|
|
image: cloudflare/cloudflared:latest
|
|
container_name: gsdchat-tunnel
|
|
restart: unless-stopped
|
|
command: tunnel --no-autoupdate run
|
|
environment:
|
|
- TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}
|
|
depends_on:
|
|
- gsdchat
|
|
networks:
|
|
- gsdchat-net
|
|
|
|
networks:
|
|
gsdchat-net:
|
|
driver: bridge
|