Skip to content

Compose example is awful #560

@Printoiid

Description

@Printoiid

Please update your compose example. It's silly to even need to manually chown an opt directory as it's against the fundamentals of linux - (It should be in Opt, but it seems like the "normal" thing to do to avoid user confusion is throw it in the working directory, EG where the docker-compose.yml exists) just path it to a local directory and you can completely skip that step.

This is in reference to the documented compose file here : https://github.com/factoriotools/factorio-docker/blob/master/docker/docker-compose.yml

version: '2'
services:
  factorio:
    image: factoriotools/factorio:latest
    restart: always
    container_name: factorio-server
    ports:
     - 34197:34197/udp
     - 27015:27015/tcp
    volumes:
     - "./data:/factorio"
    environment:
     - PUID=1000
     - PGID=1000
     - USERNAME=FactorioProfileName
     - TOKEN=FactorioProfileToken
     - PRESET=Default
     - DLC_SPACE_AGE=true

Activity

DrPhillOS

DrPhillOS commented on Jan 21, 2025

@DrPhillOS

You don't even need to put it /opt, just map the volume to a folder somewhere else.

Here's mine:

    container_name: factorio
    image: "factoriotools/factorio:stable-2.0.30"
    restart: always
    environment:
      PUID: 845
      PGID: 845
      DLC_SPACE_AGE: true
      USERNAME: "REDACTED"
      LOAD_LATEST_SAVE: true
    ports:
      - "34197:34197/udp"
      - "27015:27015/tcp"
    volumes:
      - /home/sadmin/docker/factorio:/factorio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @fank@Printoiid@DrPhillOS

        Issue actions

          Compose example is awful · Issue #560 · factoriotools/factorio-docker