diff --git a/.env.fivem.example b/.env.fivem.example new file mode 100644 index 0000000..1778c14 --- /dev/null +++ b/.env.fivem.example @@ -0,0 +1,12 @@ +# Copy this to .env and fill in your values before running: +# cp .env.fivem.example .env + +# FiveM license key (required) - get one at https://keymaster.fivem.net +FIVEM_LICENSE_KEY=cfxk_xxxxxxxxxxxxxxxxxxxxx + +# API keys (copy from game-server/.env or docker-compose.yml) +SWRP_API_SERVER=https://api.southwest-roleplay.dev/game +SWRP_API_SERVER_KEY= +SWRP_UCP_URL=https://api.southwest-roleplay.dev/game +SWRP_WIKI_URL=https://wiki.southwest-roleplay.com +INTERNAL_API_KEY= diff --git a/docker-compose.fivem.yml b/docker-compose.fivem.yml new file mode 100644 index 0000000..061367d --- /dev/null +++ b/docker-compose.fivem.yml @@ -0,0 +1,40 @@ +services: + swrp-fivem: + image: spritsail/fivem + container_name: swrp-fivem + stdin_open: true + tty: true + ports: + - '30120:30120/tcp' + - '30120:30120/udp' + volumes: + # Server config and default FiveM resources (initialized on first run) + - ./fivem-data:/config + # Our sw-rp resource (compiled dist + node_modules + ormconfig.js) + - ./fivem-server:/config/resources/sw-rp + environment: + - TZ=Europe/London + # FiveM license key from https://keymaster.fivem.net + - LICENSE_KEY=${FIVEM_LICENSE_KEY} + # Database (shared with existing game server) + - DB_HOST=play.southwest-roleplay.dev + - DB_PORT=3306 + - DB_USER=imperium + - DB_PASS=hLTZaLoTKuP7xRNooj8AioAQ6GGojhxq + - DB_NAME=game + # Redis (on the shared Docker network) + - REDIS_HOST=swrp-redis + - REDIS_PORT=6379 + # API keys + - SWRP_API_SERVER=${SWRP_API_SERVER:-https://api.southwest-roleplay.dev/game} + - SWRP_API_SERVER_KEY=${SWRP_API_SERVER_KEY} + - SWRP_UCP_URL=${SWRP_UCP_URL:-https://api.southwest-roleplay.dev/game} + - SWRP_WIKI_URL=${SWRP_WIKI_URL:-https://wiki.southwest-roleplay.com} + - INTERNAL_API_KEY=${INTERNAL_API_KEY} + restart: unless-stopped + networks: + - game-server_default + +networks: + game-server_default: + external: true