Using /persistent now for persistent data volume; changed image tags slightly

This commit is contained in:
William Miceli
2024-02-23 18:19:37 -05:00
parent 48f55cd86c
commit 4c56c84296
3 changed files with 22 additions and 16 deletions

View File

@@ -55,9 +55,9 @@ steps:
- if [ -n "$DRONE_SEMVER" ]; then docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:${DRONE_SEMVER_MAJOR}; fi
- if [ -n "$DRONE_SEMVER" ]; then docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}; fi
- if [ -n "$DRONE_SEMVER" ]; then docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}.${DRONE_SEMVER_PATCH}; fi
- docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:app_build_id$${APP_BUILD_ID}
- docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:ci_build${DRONE_BUILD_NUMBER}
- docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:commit_sha${DRONE_COMMIT_SHA:0:12}
- docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:app_build_id-$${APP_BUILD_ID}
- docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:ci_build-${DRONE_BUILD_NUMBER}
- docker image tag image:latest git.williammiceli.systems/william/docker_satisfactory-server:commit_sha-${DRONE_COMMIT_SHA:0:12}
- docker image push --all-tags git.williammiceli.systems/william/docker_satisfactory-server
depends_on:
- build
@@ -82,9 +82,9 @@ steps:
- if [ -n "$DRONE_SEMVER" ]; then docker image tag image:latest docker.io/williammiceli/satisfactory-server:${DRONE_SEMVER_MAJOR}; fi
- if [ -n "$DRONE_SEMVER" ]; then docker image tag image:latest docker.io/williammiceli/satisfactory-server:${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}; fi
- if [ -n "$DRONE_SEMVER" ]; then docker image tag image:latest docker.io/williammiceli/satisfactory-server:${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}.${DRONE_SEMVER_PATCH}; fi
- docker image tag image:latest docker.io/williammiceli/satisfactory-server:app_build_id$${APP_BUILD_ID}
- docker image tag image:latest docker.io/williammiceli/satisfactory-server:ci_build${DRONE_BUILD_NUMBER}
- docker image tag image:latest docker.io/williammiceli/satisfactory-server:commit_sha${DRONE_COMMIT_SHA:0:12}
- docker image tag image:latest docker.io/williammiceli/satisfactory-server:app_build_id-$${APP_BUILD_ID}
- docker image tag image:latest docker.io/williammiceli/satisfactory-server:ci_build-${DRONE_BUILD_NUMBER}
- docker image tag image:latest docker.io/williammiceli/satisfactory-server:commit_sha-${DRONE_COMMIT_SHA:0:12}
- docker image push --all-tags docker.io/williammiceli/satisfactory-server
depends_on:
- build

View File

@@ -23,6 +23,11 @@ ENV LANGUAGE 'en_US:en'
# Create user for SteamCMD
RUN useradd -m steam
# Setup Directory for Persistent Data
RUN mkdir -p /home/steam/.config/Epic/FactoryGame/Saved/SaveGames /persistent && \
ln -s /persistent /home/steam/.config/Epic/FactoryGame/Saved/SaveGames && \
chown -R steam /persistent
# Switch to Steam user
USER steam
WORKDIR /home/steam
@@ -38,7 +43,7 @@ RUN steamcmd +force_install_dir /home/steam/satisfactory_server +login anonymous
EXPOSE 7777/udp 15000/udp 15777/udp
# Persistent data volume for the server
VOLUME ["/home/steam/.config/Epic/FactoryGame/Saved"]
VOLUME ["/persistent"]
# Start command for the server
CMD ["/home/steam/satisfactory_server/FactoryServer.sh"]
@@ -46,5 +51,5 @@ CMD ["/home/steam/satisfactory_server/FactoryServer.sh"]
# Labels
LABEL org.opencontainers.image.authors="William Miceli; https://github.com/WilliamMiceli; https://williammiceli.me"
LABEL org.opencontainers.image.source=https://github.com/WilliamMiceli/Docker_Satisfactory-Server
LABEL org.opencontainers.image.revision=${DRONE_COMMIT_SHA}
LABEL org.opencontainers.image.created=${DRONE_BUILD_STARTED}
LABEL org.opencontainers.image.revision=$${DRONE_COMMIT_SHA}
LABEL org.opencontainers.image.created=$${DRONE_BUILD_STARTED}

View File

@@ -11,17 +11,19 @@
# Usage
## Public Image Repository
[Docker Hub](https://hub.docker.com/r/williammiceli/satisfactory-server)
## Available Tags
- [`latest`](https://hub.docker.com/r/williammiceli/satisfactory-server/tags?name=latest)
- [`app_build_id-<id>`](https://hub.docker.com/r/williammiceli/satisfactory-server/tags?name=app_build_id)
- [`ci_build-<number>`](https://hub.docker.com/r/williammiceli/satisfactory-server/tags?name=ci_build)
- [`commit_sha-<hash>`](https://hub.docker.com/r/williammiceli/satisfactory-server/tags?name=commit_sha)
## Running This Image
### One-line (Useful for Testing)
```sh
docker run -d -p 7777:7777/udp -p 15000:15000/udp -p 15777:15777/udp -v /path/to/your/data:/home/steam/.config/Epic/FactoryGame/Saved williammiceli/satisfactory-server:latest
docker run -d -p 7777:7777/udp -p 15000:15000/udp -p 15777:15777/udp -v /path/to/your/data:/persistent williammiceli/satisfactory-server:latest
```
### Docker Compose
@@ -43,7 +45,7 @@ services:
volumes:
- type: bind
source: ./data # Path to your local directory for server data
target: /home/steam/.config/Epic/FactoryGame/Saved
target: /persistent
restart: unless-stopped
```
@@ -70,19 +72,18 @@ docker compose down
```sh
docker image pull williammiceli/satisfactory-server:latest
```
### Use SteamCMD In Running Container
```sh
steamcmd +force_install_dir /home/steam/satisfactory_server +login anonymous +app_update 1690800 -beta public validate +quit
```
![Player Thumbs Up](https://img2.storyblok.com/fit-in/0x800/filters:format(png)/f/110098/600x730/99e92fe34f/hero-graphic.png)
# Meta
* [Docker Hub](https://hub.docker.com/r/williammiceli/satisfactory-server)
* [Build System](https://drone.williammiceli.systems/William/Docker_Satisfactory-Server)
## Credits for Useful References