JustaPenguin / assetto-server-manager

A web interface to manage an Assetto Corsa Server.
https://github.com/JustaPenguin/assetto-server-manager/releases
MIT License
293 stars 71 forks source link

v1.7.7 Premium docker install error #986

Open mzman88 opened 4 years ago

mzman88 commented 4 years ago

v1.7.7 ---- When running docker compose up -d I get an error stemming from the dockerfile.

Step 18/30 : ADD linux/server-manager ${SERVER_MANAGER_DIR}/server-manager ERROR: Service 'assetto-multiserver' failed to build: ADD failed: stat /var/lib/docker/tmp/docker-builder539139640/linux/server-manager: no such file or directory

To Reproduce Steps to reproduce the behavior: Follow install instructions, when you get to running docker-compose up -d you get an error from the dockerfile

Expected behavior For the docker image to be created like the free version

Additional context I have the free version running without issue in docker, but following the instructions for the premium install result in errors in the dockerfile that I'm not sure how to resolve.

cj123 commented 4 years ago

Hi, are you following the install instructions in the README of the multiserver? To my knowledge those instructions are correct and working?

When you build the docker image, there must be a folder called 'linux' inside the build context, and it must have the linux server-manager binary in it

mzman88 commented 4 years ago

Thank you for your response. I am following section 3 and 4 from the guide: https://github.com/JustaPenguin/assetto-server-manager/wiki/Upgrading-to-Premium but the README in the multiserver folder appears to have basically the same instructions.

The readme states: "copy your server-manager executable (server-manager.exe on Windows, server-manager on Linux) so that it is in the same folder as this README.txt....Copy your server-manager config.yml to this directory as well"

You're saying that's not correct and that instead I should be copying the linux folder (containing server-manager and config.yml) into the multiserver folder? Then run the docker compose?

mzman88 commented 4 years ago

Update:

Following your advice I recreated the folder structure by moving linux folder inside the multisever folder. This allowed docker-compose.yml to run succesfully.

I'm now faced with an error upon start of the container.

time="2020-08-12T14:22:30-04:00" level=fatal msg="Could not create assetto corsa multiserver instance" error="mkdir servers/SERVER_00: permission denied", time="2020-08-12T14:22:30-04:00" level=info msg="Creating/Updating server 0 at: servers/SERVER_00"

I did run mkdir server before running docker-compose up -d per the instructions.

Here is the docker-compose.yml that I used that is giving the error above:

version: "3"

services: assetto-multiserver: build: . restart: always stop_signal: SIGINT ports:

server manager web interface port

- 0.0.0.0:8773:8772

# be sure to add ports for each assetto corsa server instance here
- 0.0.0.0:9600:9600
- 0.0.0.0:9600:9600/udp
- 0.0.0.0:8095:8095
- 0.0.0.0:9697:9697
- 0.0.0.0:9697:9697/udp
- 0.0.0.0:8097:8097

entrypoint: ./assetto-multiserver-manager
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
- ./servers.yml:/home/assetto/server-manager/servers.yml
- ./linux/config.yml:/home/assetto/server-manager/config.yml
# note that the 'assetto' folder needs to exist and have the assetto server installed
- ./assetto:/home/assetto/server-manager/assetto
# note that the 'servers' folder needs to exist, e.g. `mkdir servers` before running docker-compose up
- ./servers:/home/assetto/server-manager/servers
# note that the 'shared_store.json' folder needs to exist, e.g. `mkdir shared_store.json` before running docker-compose up
- ./shared_store.json:/home/assetto/server-manager/shared_store.json
mzman88 commented 4 years ago

Update I was able to resolve the servers issue and a subsequent shared_store.json issue by giving those two folders 777 permissions.

chmod -R 777 servers shared_store.json

I'll bring back permissions slowly to see what is truly needed, but default mkdir does not give enough permissions to run.