forked from jakub/ansible
84 lines
2.3 KiB
YAML
84 lines
2.3 KiB
YAML
# Portainer stack name: valheim
|
|
# Target: pve2_vm / vm-portainer-services
|
|
# The game service, data paths, secrets, backups and UDP ports are unchanged.
|
|
name: valheim
|
|
services:
|
|
valheim:
|
|
image: ghcr.io/community-valheim-tools/valheim-server:latest
|
|
container_name: valheim
|
|
restart: unless-stopped
|
|
stop_grace_period: 2m
|
|
cap_add:
|
|
- SYS_NICE
|
|
ports:
|
|
- "2456-2457:2456-2457/udp"
|
|
# Host TCP 8095 -> ValheimWebMap internal TCP 3696.
|
|
# This is an unauthenticated map; restrict ingress via firewall/proxy.
|
|
- "8095:3696/tcp"
|
|
environment:
|
|
TZ: "Europe/Prague"
|
|
PUID: "1000"
|
|
PGID: "1000"
|
|
SERVER_NAME: "Fencl Valheim"
|
|
WORLD_NAME: "Fenheilm"
|
|
SERVER_PORT: "2456"
|
|
SERVER_PUBLIC: "false"
|
|
CROSSPLAY: "false"
|
|
SERVER_PASS_FILE: "/run/secrets/valheim_server_pass"
|
|
UPDATE_CRON: ""
|
|
RESTART_CRON: ""
|
|
BACKUPS: "true"
|
|
BACKUPS_CRON: "5 * * * *"
|
|
BACKUPS_DIRECTORY: "/config/backups"
|
|
BACKUPS_MAX_AGE: "7"
|
|
BACKUPS_MAX_COUNT: "168"
|
|
BACKUPS_IF_IDLE: "true"
|
|
BACKUPS_ZIP: "true"
|
|
VALHEIM_PLUS: "false"
|
|
BEPINEX: "true"
|
|
SUPERVISOR_HTTP: "false"
|
|
STATUS_HTTP: "false"
|
|
volumes:
|
|
- type: bind
|
|
source: /data/compose/valheim/config
|
|
target: /config
|
|
bind:
|
|
create_host_path: false
|
|
- type: bind
|
|
source: /data/compose/valheim/data
|
|
target: /opt/valheim
|
|
bind:
|
|
create_host_path: false
|
|
- type: bind
|
|
source: /backups/valheim/automatic
|
|
target: /config/backups
|
|
bind:
|
|
create_host_path: false
|
|
- type: bind
|
|
source: /home/howard/.ansible-compose/env/valheim_server_pass
|
|
target: /run/secrets/valheim_server_pass
|
|
read_only: true
|
|
bind:
|
|
create_host_path: false
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- /bin/bash
|
|
- -c
|
|
- >-
|
|
. /usr/local/etc/valheim/defaults &&
|
|
. /usr/local/etc/valheim/common &&
|
|
server_is_running && server_is_listening
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 30m
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
networks:
|
|
default:
|
|
driver: bridge
|