diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..963a057 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +.env diff --git a/docker-compose.yml b/docker-compose.yml index 0a04b3e..00ba3f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,51 @@ version: '3' services: - source-fastdownload-server: - build: . - container_name: source-fastdownload-server - ports: - - "80:80" + tf2-dedicated-server: + image: cm2network/tf2:sourcemod + container_name: tf2-dedicated-server + network_mode: host + 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: - - 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: - source-fastdownload: + tf2-server: + tf2-server-download-data: + +networks: + bridge: + driver: bridge \ No newline at end of file