crazy-max / csgo-server-launcher

Counter-Strike Global Offensive Dedicated Server Launcher
GNU Lesser General Public License v3.0
586 stars 119 forks source link

Environment variables in docker-composer has bug #53

Closed dEROZA closed 5 years ago

dEROZA commented 5 years ago
Environment variables
    TZ : The timezone assigned to the container (default UTC)
    PUID : The timezone assigned to the container (default 1000)
    PGID : The timezone assigned to the container (default 1000)

PUID, PGID not works for

docker-composer up -d I've already another user under 1000 id, steam at 1001.

I configured csgo-server-launcher.env, and change PUID, and PGID to 1001, but instead of this docker installed files as 1000 uid forcibly

crazy-max commented 5 years ago

What's the content of your compose file ?

dEROZA commented 5 years ago

What's the content of your compose file ?

TZ=Asia/Irkutsk
PUID=1001
PGID=1001
SSMTP_HOST=smtp.example.com
SSMTP_PORT=587
SSMTP_HOSTNAME=example.com
SSMTP_USER=smtp@example.com
SSMTP_PASSWORD=
SSMTP_TLS=YES

GSLT=
STEAM_LOGIN=anonymous
STEAM_PASSWORD=anonymous
UPDATE_EMAIL=
UPDATE_RETRY=3
CLEAR_DOWNLOAD_CACHE=0
API_AUTHORIZATION_KEY=
WORKSHOP_COLLECTION_ID=125499818
WORKSHOP_START_MAP=125488374
MAXPLAYERS=32
TICKRATE=128
EXTRAPARAMS=-nohltv +sv_pure 0 +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2
crazy-max commented 5 years ago

Compose YML file..

dEROZA commented 5 years ago

Compose YML file..

version: "3.2"

services:
  csgo:
    image: crazymax/csgo-server-launcher:latest
    container_name: csgo
    ports:
      - target: 27015
        published: 27015
        protocol: udp
      - target: 27015
        published: 27015
        protocol: tcp
    env_file:
      - "./csgo-server-launcher.env"
    volumes:
      - "./csgo:/var/steamcmd/games/csgo"
      - "./steam:/home/steam/Steam"
    tty: true
    ulimits:
      nproc: 65535
      nofile:
        soft: 32000
        hard: 40000
    restart: always

I dont't fully understand what I must to do if I want to install server automatically with docker feature. I read all your scripts and can't understand where csgo server will be deployed. Where docker file will be executed, on host or in container?

P.S. I've a trouble with /var/, it has a very small disc space. So server can't installed, I downloaded csgo and put it into /home/steam/csgo-server-launcher/csgo/ dir. As I understood you used a volume feature and it must be workable.

crazy-max commented 5 years ago

what is it mean?)

I talk about docker-compose.yml.

Where docker file will be executed, on host or in container?

In a container. Please read my comment to fully understand how docker works.

I've a trouble with /var/, it has a very small disc space.

Like I said in the README, the path /var/csgo-server-launcher/ on your host is an example. Use another path if you want.