Update documentation with new deployment configuration

This commit is contained in:
Josh.5
2023-09-30 10:40:32 +13:00
parent 12cc16459a
commit f4cad0aab0
7 changed files with 6 additions and 80 deletions

View File

@@ -19,12 +19,10 @@ services:
- apparmor:unconfined
# NETWORK:
network_mode: host
hostname: ${NAME}
extra_hosts:
- "${NAME}:127.0.0.1"
networks:
external-macvlan:
ipv4_address: ${CONTAINER_IP_ADDRESS}
# ENVIRONMENT:
## Read all config variables from the .env file
@@ -63,18 +61,4 @@ services:
# Leave commented out to not share the pulse socket with any other Docker containers.
#- /opt/container-data/steam-headless/pulse/:/tmp/pulse/:rw
# Input devices used for mouse and joypad support inside the container.
- /dev/input/:/dev/input/:ro
# Host udev data required for input devices
- /run/udev/data/:/run/udev/data/:ro
# Store flatpak var files in a volume.
- steam-headless-var-lib-flatpak:/var/lib/flatpak/:rw
volumes:
steam-headless-var-lib-flatpak:
networks:
external-macvlan:
external: true
name: ${NETWORK_NAME}

View File

@@ -14,8 +14,8 @@ services:
hard: 524288
# NETWORK:
## NOTE: If we do not use the host network, then physical device input is not possible
## and your USB connected controllers will not work in steam games.
## NOTE: With this configuration, if we do not use the host network, then physical device input
## is not possible and your USB connected controllers will not work in steam games.
network_mode: host
hostname: ${NAME}
extra_hosts:
@@ -49,8 +49,3 @@ services:
# Input devices used for mouse and joypad support inside the container.
- /dev/input/:/dev/input/:ro
# Store flatpak var files in a volume.
- steam-headless-var-lib-flatpak:/var/lib/flatpak/:rw
volumes:
steam-headless-var-lib-flatpak:

View File

@@ -41,55 +41,6 @@ Create a Steam Headless `/opt/container-services/steam-headless/docker-compose.y
Populate this file with the contents of the default [Docker Compose File](./compose-files/docker-compose.default.yml).
## CONFIGURE HOST:
It is recommended that you configure this container to use a Macvlan network. If you know what you are doing, you can also use an IPvlan or Host, but I will not be covering that setup in this documentation.
To simplify the setup process and allow you to reuse the created Macvlan for other containers, we will create this Macvlan manually rather than have Docker compose handle it. If you know what you are doing with Docker compose and you would rather have the Macvlan managed there, feel free to do so. Otherwise run this command and carry on with the setup:
### 1) Discover your parent network:
To find the parent network device, run the command `ip address show`. Find the device that has the IP address of your Host server.
```
root@Tower:~# ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc fq master br0 state UP group default qlen 1000
link/ether 7c:11:a9:b1:15:b9 brd ff:ff:ff:ff:ff:ff
4: eth0.1@eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0.1 state UP group default qlen 1000
link/ether 7c:11:a9:b1:15:b9 brd ff:ff:ff:ff:ff:ff
5: eth0.3@eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0.3 state UP group default qlen 1000
link/ether 7c:11:a9:b1:15:b9 brd ff:ff:ff:ff:ff:ff
6: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 7c:11:a9:b1:15:b9 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.43/24 brd 192.168.1.255 scope global dynamic noprefixroute br0
valid_lft 440sec preferred_lft 365sec
```
In this example output, I will select br0 as the parent network device which has the IP address of "192.168.1.43".
### 2) Create a macvlan Docker network
```
# Set the parent network device.
NETWORK_PARTENT=br0
# Name this whatever you like, but ensure you update the `.env` file below to match.
NETWORK_NAME=steam-headless-vlan
# Choose a network subnet and gateway that matches your host network
NETWORK_SUBNET=192.168.1.0/24
NETWORK_GATEWAY=192.168.1.1
# Execute the docker network create command
sudo docker network create -d macvlan \
--subnet=${NETWORK_SUBNET:?} \
--gateway=${NETWORK_GATEWAY:?} \
-o parent=${NETWORK_PARTENT:?} \
${NETWORK_NAME:?}
```
## CONFIGURE ENV:
Create a Steam Headless `/opt/container-services/steam-headless/.env` file with the contents found in this example [Environment File](./compose-files/.env).
@@ -105,9 +56,5 @@ sudo docker-compose up -d --force-recreate
```
After container executes successfully, navigate to your docker host URL in your browser on port 8083 and click connect.
http://<host-ip>:8083/
![img.png](../images/vnc_connect.png)
If using a `/mnt/games` volume mount, wait until Steam installs and executes, then restart the container. This step
is necessary to create the required steamapps folder in the /mnt/games volume after initial installation. If this
doesn't occur, you will receive a "disk write error" when trying to install to this location.
`http://<host-ip>:8083/`
![img.png](./images/web_connect.png)

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

BIN
docs/images/web_connect.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@@ -11,7 +11,7 @@ Once your Flatpak refresh is complete, everything should work correctly and your
## An error occurred while installing <game>: "disk write error"
![img.png](../images/disk_write_error.png)
![img.png](./images/disk_write_error.png)
1) Stop the container
2) Verify your mounted /mnt/games volume is owned by the executing UID/GID, and 777 permissions are set.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB