Created docker-compose file

This commit is contained in:
boo3 2024-09-30 02:39:34 +02:00
parent 08de32ed44
commit d794021987
2 changed files with 48 additions and 7 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.env

View File

@ -1,12 +1,51 @@
version: '3' version: '3'
services: services:
source-fastdownload-server: tf2-dedicated-server:
build: . image: cm2network/tf2:sourcemod
container_name: source-fastdownload-server container_name: tf2-dedicated-server
ports: network_mode: host
- "80:80" depends_on:
- tf2-dedicated-server-download
environment:
- SRCDS_TOKEN="${SRCDS_TOKEN}"
- SRCDS_RCONPW=${SRCDS_RCONPW}
- SRCDS_PW=${SRCDS_PW}
- SRCDS_PORT="${SRCDS_PORT}"
- SRCDS_TV_PORT="${SRCDS_TV_PORT}"
- SRCDS_IP="${SRCDS_IP}"
- SRCDS_FPSMAX="${SRCDS_FPSMAX}"
- SRCDS_TICKRATE="${SRCDS_TICKRATE}"
- SRCDS_MAXPLAYERS="${SRCDS_MAXPLAYERS}"
- SRCDS_REGION="${SRCDS_REGION}"
- SRCDS_STARTMAP="${SRCDS_STARTMAP}"
- SRCDS_HOSTNAME="${SRCDS_HOSTNAME}"
- SRCDS_WORKSHOP_AUTHKEY="${SRCDS_WORKSHOP_AUTHKEY}"
- SRCDS_CFG="${SRCDS_CFG}"
- SRCDS_MAPCYCLE="${SRCDS_MAPCYCLE}"
- SRCDS_SECURED="${SRCDS_SECURED}"
volumes: volumes:
- source-fastdownload:/usr/local/apache2/htdocs/source - tf2-server:/home/steam/tf-dedicated/
- tf2-server-download-data:/home/steam/tf-dedicated/tf/custom/server/
restart: unless-stopped
tf2-dedicated-server-download:
build: .
restart: unless-stopped
container_name: tf2-dedicated-server-download
network_mode: bridge
volumes:
- tf2-server-download-data:/usr/local/apache2/htdocs/source/tf/
labels:
traefik.enable: "true"
traefik.http.routers.tf2download.entrypoints: "web, websecure"
traefik.http.routers.tf2download.rule: "${ROOT_URL_TRAEFIK}"
traefik.http.routers.tf2download.tls: "true"
traefik.http.routers.tf2download.tls.certresolver: "production"
traefik.http.services.tf2download.loadbalancer.server.port: "${PORT_TRAEFIK}"
volumes: volumes:
source-fastdownload: tf2-server:
tf2-server-download-data:
networks:
bridge:
driver: bridge