From eaf5fd5f7ecff3fb819389a8dc4e178e96e2e7e4 Mon Sep 17 00:00:00 2001 From: Shishir Ahmed <51795191+shishirahm3d@users.noreply.github.com> Date: Sun, 28 Sep 2025 02:38:46 +0600 Subject: [PATCH] Add FiveM server template with dual deployment modes (#393) * feat: Added fivem server * feat: add FiveM server template with dual deployment modes feat: add FiveM server template with dual deployment modes - Add docker-compose.yml with spritsail/fivem image - Support both standard FiveM server and txAdmin web interface modes - Configure environment variables for license key management - Add comprehensive documentation for deployment modes - Include template.toml with optional license key configuration - Add FiveM logo and meta.json entry - Support persistent storage for config and txAdmin data - Configure proper port mapping (30120 game, 40120 web UI) - Add interactive TTY setup required for FiveM container Template supports two modes: - Standard: Direct server with LICENSE_KEY env var - txAdmin: Web management with NO_DEFAULT_CONFIG=1 * docs: add deployment mode awareness to FiveM docker-compose docs: clarify FiveM deployment modes in docker-compose Add detailed comments explaining standard server vs txAdmin modes to prevent configuration errors and licensing issues. * Added all env variables. * fix: follow Dokploy template.toml format --- blueprints/fivem/docker-compose.yml | 41 +++++++++++++++++++++++++++++ blueprints/fivem/logo.svg | 10 +++++++ blueprints/fivem/template.toml | 17 ++++++++++++ meta.json | 18 +++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 blueprints/fivem/docker-compose.yml create mode 100644 blueprints/fivem/logo.svg create mode 100644 blueprints/fivem/template.toml diff --git a/blueprints/fivem/docker-compose.yml b/blueprints/fivem/docker-compose.yml new file mode 100644 index 00000000..162239bf --- /dev/null +++ b/blueprints/fivem/docker-compose.yml @@ -0,0 +1,41 @@ +# docker-compose.yml +# +# IMPORTANT: FiveM Template - Two Deployment Modes +# +# MODE 1: Standard FiveM Server +# - Set LICENSE_KEY environment variable (get free from https://forum.fivem.net/) +# - Leave NO_DEFAULT_CONFIG empty or unset +# - Server configured via /config files +# - No web management interface +# +# MODE 2: txAdmin Web Interface +# - Set NO_DEFAULT_CONFIG=1 +# - DO NOT set LICENSE_KEY (configure via web UI) +# - Access web management at https://your-domain +# - License configured through txAdmin interface +# +# WARNING: Don't mix modes! Setting both LICENSE_KEY and NO_DEFAULT_CONFIG=1 causes errors +# +services: + fivem: + image: spritsail/fivem:latest + restart: unless-stopped + tty: true + stdin_open: true + environment: + - LICENSE_KEY=${license_key} + - RCON_PASSWORD=${rcon_password} + - NO_DEFAULT_CONFIG=${NO_DEFAULT_CONFIG:-} + volumes: + - fivem_config:/config + - fivem_txdata:/txData + ports: + - 30120:30120 + - 30120:30120/udp + - 40120 + labels: + - "traefik.enable=true" + +volumes: + fivem_config: + fivem_txdata: \ No newline at end of file diff --git a/blueprints/fivem/logo.svg b/blueprints/fivem/logo.svg new file mode 100644 index 00000000..f8f2b290 --- /dev/null +++ b/blueprints/fivem/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/blueprints/fivem/template.toml b/blueprints/fivem/template.toml new file mode 100644 index 00000000..6b823eaf --- /dev/null +++ b/blueprints/fivem/template.toml @@ -0,0 +1,17 @@ +[variables] +main_domain = "${domain}" +license_key = "${password:32}" +rcon_password = "${password:16}" + +[config] +env = [ + "LICENSE_KEY=${license_key}", + "RCON_PASSWORD=${rcon_password}", + "NO_DEFAULT_CONFIG=${NO_DEFAULT_CONFIG:-}" +] +mounts = [] + +[[config.domains]] +serviceName = "fivem" +port = 40120 +host = "${main_domain}" \ No newline at end of file diff --git a/meta.json b/meta.json index 6cc5c3c2..b7cdfd5b 100644 --- a/meta.json +++ b/meta.json @@ -1967,6 +1967,24 @@ "self-hosted" ] }, + { + "id": "fivem", + "name": "FiveM Server", + "version": "latest", + "description": "A modded GTA V multiplayer server with optional txAdmin web interface for easy server management.", + "logo": "logo.svg", + "links": { + "github": "https://github.com/spritsail/fivem", + "website": "https://fivem.net/", + "docs": "https://docs.fivem.net/docs/server-manual/" + }, + "tags": [ + "gaming", + "gta", + "multiplayer", + "server" + ] + }, { "id": "flagsmith", "name": "Flagsmith",