Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support] Easier updating of docker-compose instance? (SHA256) #552

Open
ividyon opened this issue Nov 18, 2024 · 3 comments
Open

[Support] Easier updating of docker-compose instance? (SHA256) #552

ividyon opened this issue Nov 18, 2024 · 3 comments

Comments

@ividyon
Copy link

ividyon commented Nov 18, 2024

First off, the project works wonderfully, thank you very much.

Currently, whenever I want to upgrade the server to one of the many, many updates of Factorio, it's not enough to just set version to latest. I have to also procure the latest SHA256 from the buildinfo.json file. This seems to defeat the point of having a version tagged "latest" in the first place.

Can you suggest/implement a way of being able to just provide a version number, or even just "latest", and have the SHA256 be grabbed from buildinfo.json automatically?

@AidanHarveyNelson
Copy link

Not sure exactly what you are having issues with my docker compose looks like this

  factorio:
    container_name: factorio
    hostname: factorio
    image: factoriotools/factorio:stable
    ports:
      - 34197:34197/udp
      - 27015:27015/tcp
    volumes:
      - ${CONFIG_MOUNT_PATH}/factorio:/factorio
    environment:
      - LOAD_LATEST_SAVE=false
      - SAVE_NAME=factorio
    restart: unless-stopped

Then I have a scheduled job on my server that checks every hour whether the server needs to be updated such as
docker-compose up --pull always -d factorio. Thus as soon as the update goes live and is pushed to the stable branch the docker image will automatically pull the image down and restart the container, if no update it does nothing

Are you building the image from scratch each time?

@JeremyComelli1
Copy link

JeremyComelli1 commented Nov 27, 2024

I had the same issue and solved this by adding a watchtower service in my compose:

  watchtower:
    container_name: "Factorio_watchtower"
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --cleanup --interval 3600

With this config it will check for updates, download if necessary and restart the container as needed once an hour. I use factoriotools/factorio:stable image, as latest is sometimes updated before the steam version

@Fank
Copy link
Member

Fank commented Nov 28, 2024

I can recommend using the docker compose because it also contains auto update handling:
https://github.com/factoriotools/factorio-docker/blob/master/docker-compose.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants