Deploy a Docker container for SCPSL

This commit is contained in:
Salt 2021-03-05 00:56:03 -06:00
parent d3126738fc
commit 1107764d16

View File

@ -5,6 +5,10 @@
- hosts: game1.desu.ltd - hosts: game1.desu.ltd
vars_files: vars_files:
- vars/factorio-main.yml - vars/factorio-main.yml
tasks:
- name: install docker libs
apt: name=python3-docker
tags: [ docker ]
roles: roles:
- role: backup - role: backup
vars: vars:
@ -18,6 +22,8 @@
- /opt/minecraft/valhelsia/backups - /opt/minecraft/valhelsia/backups
- /opt/minecraft/vanilla/backups - /opt/minecraft/vanilla/backups
tags: [ backup ] tags: [ backup ]
- role: docker
tags: [ docker, skip-pull ]
- role: motd - role: motd
vars: vars:
motd_watch_services_extra: motd_watch_services_extra:
@ -40,6 +46,26 @@
lan: false lan: false
admins: [ "rehashed_salt" ] admins: [ "rehashed_salt" ]
tags: [ game, factorio ] tags: [ game, factorio ]
# Docker gameservers
- hosts: game1.desu.ltd
vars:
container_default_behavior: no_defaults
tasks:
# https://github.com/mkrupczak3/SCP-SECRET-LAB-DOCKER
# Kinda forked it and changed a few settings tho
- name: docker deploy scpsl
docker_container:
name: scpsl
image: rehashedsalt/scpsl:latest
restart_policy: unless-stopped
ports:
- "7777-7784:7777-7784/udp"
- "7777-7784:7777-7784"
volumes:
- /etc/localtime:/etc/localtime:ro
- /home/steam/steamcmd
- /home/steam/scp_server
tags: [ docker, scpsl ]
# Vanilla Ice # Vanilla Ice
# Note that this one doesn't get a nightly restart job because Paper is awesome # Note that this one doesn't get a nightly restart job because Paper is awesome
- hosts: game1.desu.ltd - hosts: game1.desu.ltd