mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-03-29 18:35:39 +01:00
Compare commits
3 Commits
e6e53c35a1
...
54a03517ba
Author | SHA1 | Date | |
---|---|---|---|
|
54a03517ba | ||
|
725018f8b4 | ||
|
8d972fdf69 |
35
docker-compose.yml
Normal file
35
docker-compose.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
version: "2"
|
||||||
|
services:
|
||||||
|
factorio:
|
||||||
|
container_name: factorio
|
||||||
|
image: factoriotools/factorio:stable
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "34197:34197/udp"
|
||||||
|
- "27015:27015/tcp"
|
||||||
|
volumes:
|
||||||
|
- ./data:/factorio
|
||||||
|
environment:
|
||||||
|
- UPDATE_MODS_ON_START=true
|
||||||
|
#labels:
|
||||||
|
# # Labels to allow autoupdate only if no players are online
|
||||||
|
# - com.centurylinklabs.watchtower.enable=true
|
||||||
|
# - com.centurylinklabs.watchtower.scope=factorio
|
||||||
|
# - com.centurylinklabs.watchtower.lifecycle.pre-update="/players-online.sh"
|
||||||
|
|
||||||
|
# Uncomment the following files to use watchtower for updating the factorio container
|
||||||
|
# Full documentation of watchtower: https://github.com/containrrr/watchtower
|
||||||
|
#watchtower:
|
||||||
|
# container_name: watchtower_factorio
|
||||||
|
# image: containrrr/watchtower
|
||||||
|
# restart: unless-stopped
|
||||||
|
# volumes:
|
||||||
|
# - /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
# environment:
|
||||||
|
# # Only update containers which have the option 'watchtower.enable=true' set
|
||||||
|
# - WATCHTOWER_TIMEOUT=30s
|
||||||
|
# - WATCHTOWER_LABEL_ENABLE=true
|
||||||
|
# - WATCHTOWER_POLL_INTERVAL=3600
|
||||||
|
# - WATCHTOWER_LIFECYCLE_HOOKS=true
|
||||||
|
# labels:
|
||||||
|
# - com.centurylinklabs.watchtower.scope=factorio
|
@ -5,7 +5,7 @@ ONLINE_COUNT=$(echo "$PLAYERS" | grep -c " (online)$")
|
|||||||
|
|
||||||
if [[ "$ONLINE_COUNT" -gt "0" ]]; then
|
if [[ "$ONLINE_COUNT" -gt "0" ]]; then
|
||||||
echo "$PLAYERS"
|
echo "$PLAYERS"
|
||||||
# exit with 75 (EX_TEMPFAIL) for watchtower
|
# exit with 75 (EX_TEMPFAIL) so watchtower skips the update
|
||||||
# https://containrrr.dev/watchtower/lifecycle-hooks/
|
# https://containrrr.dev/watchtower/lifecycle-hooks/
|
||||||
exit 75
|
exit 75
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user