This commit is contained in:
parent
4dfc8af94b
commit
f9af291df7
1
TODO.md
1
TODO.md
@ -11,3 +11,4 @@
|
|||||||
- [ ] Add drone exec runner for Nix builds with shared `/nix`
|
- [ ] Add drone exec runner for Nix builds with shared `/nix`
|
||||||
- [ ] Lint caddy file, add gzip and disable admin interface
|
- [ ] Lint caddy file, add gzip and disable admin interface
|
||||||
- [x] Make Gitea display graphs in Notebooks (see https://docs.gitea.io/en-us/external-renderers/).
|
- [x] Make Gitea display graphs in Notebooks (see https://docs.gitea.io/en-us/external-renderers/).
|
||||||
|
- [x] Factorio server
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
- name: gitea
|
- name: gitea
|
||||||
uid: 42001
|
uid: 42001
|
||||||
state: present
|
state: present
|
||||||
|
- name: factorio
|
||||||
|
uid: 845
|
||||||
|
state: present
|
||||||
- name: hackmd
|
- name: hackmd
|
||||||
uid: 1500
|
uid: 1500
|
||||||
state: present
|
state: present
|
||||||
@ -41,6 +44,22 @@
|
|||||||
state: directory
|
state: directory
|
||||||
# Hide contents from non-root users
|
# Hide contents from non-root users
|
||||||
mode: u=rwx,g=,o=
|
mode: u=rwx,g=,o=
|
||||||
|
- name: Add Notebooks folder
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /home/jupyter/Notebooks
|
||||||
|
owner: jupyter
|
||||||
|
group: jupyter
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
- name: Create Factorio data folder
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /var/lib/pbri/docker/factorio
|
||||||
|
state: directory
|
||||||
|
owner: factorio
|
||||||
|
group: factorio
|
||||||
|
mode: u=rwx,g=,o=
|
||||||
- name: Set up docker stuff
|
- name: Set up docker stuff
|
||||||
become: true
|
become: true
|
||||||
docker_compose:
|
docker_compose:
|
||||||
@ -57,11 +76,5 @@
|
|||||||
state: present
|
state: present
|
||||||
- name: codi
|
- name: codi
|
||||||
state: present
|
state: present
|
||||||
- name: Add Notebooks folder
|
- name: factorio
|
||||||
become: true
|
state: present
|
||||||
ansible.builtin.file:
|
|
||||||
path: /home/jupyter/Notebooks
|
|
||||||
owner: jupyter
|
|
||||||
group: jupyter
|
|
||||||
state: directory
|
|
||||||
mode: 0755
|
|
||||||
|
4
docker/factorio/Dockerfile
Normal file
4
docker/factorio/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
FROM factoriotools/factorio:1.1.68
|
||||||
|
|
||||||
|
COPY server-settings.json /server-settings.json
|
||||||
|
ENTRYPOINT [ "/bin/sh", "-c", "mkdir -p /factorio/config && envsubst < /server-settings.json > /factorio/config/server-settings.json && exec /docker-entrypoint.sh" ]
|
10
docker/factorio/README.md
Normal file
10
docker/factorio/README.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# factorio
|
||||||
|
|
||||||
|
Add a `.env` file like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
GAME_PASSWORD=...
|
||||||
|
```
|
||||||
|
|
||||||
|
Environment variables are put into `server-settings.json` during startup using `envsubst`.
|
||||||
|
See also: https://hub.docker.com/r/factoriotools/factorio.
|
14
docker/factorio/docker-compose.yaml
Normal file
14
docker/factorio/docker-compose.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
gitea:
|
||||||
|
image: pbrinkmeier/factorio
|
||||||
|
build: .
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
GAME_PASSWORD: "${GAME_PASSWORD}"
|
||||||
|
volumes:
|
||||||
|
- /var/lib/pbri/docker/factorio:/factorio
|
||||||
|
ports:
|
||||||
|
- "34197:34197/udp"
|
||||||
|
- "27015:27015/tcp"
|
72
docker/factorio/server-settings.json
Normal file
72
docker/factorio/server-settings.json
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"name": "le epic factorio server",
|
||||||
|
"description": "Description of the game that will appear in the listing",
|
||||||
|
"tags": ["game", "tags"],
|
||||||
|
|
||||||
|
"_comment_max_players": "Maximum number of players allowed, admins can join even a full server. 0 means unlimited.",
|
||||||
|
"max_players": 0,
|
||||||
|
|
||||||
|
"_comment_visibility": ["public: Game will be published on the official Factorio matching server",
|
||||||
|
"lan: Game will be broadcast on LAN"],
|
||||||
|
"visibility":
|
||||||
|
{
|
||||||
|
"public": false,
|
||||||
|
"lan": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
|
||||||
|
"username": "",
|
||||||
|
"password": "",
|
||||||
|
|
||||||
|
"_comment_token": "Authentication token. May be used instead of 'password' above.",
|
||||||
|
"token": "",
|
||||||
|
|
||||||
|
"game_password": "",
|
||||||
|
|
||||||
|
"_comment_require_user_verification": "When set to true, the server will only allow clients that have a valid Factorio.com account",
|
||||||
|
"require_user_verification": false,
|
||||||
|
|
||||||
|
"_comment_max_upload_in_kilobytes_per_second" : "optional, default value is 0. 0 means unlimited.",
|
||||||
|
"max_upload_in_kilobytes_per_second": 0,
|
||||||
|
|
||||||
|
"_comment_max_upload_slots" : "optional, default value is 5. 0 means unlimited.",
|
||||||
|
"max_upload_slots": 5,
|
||||||
|
|
||||||
|
"_comment_minimum_latency_in_ticks": "optional one tick is 16ms in default speed, default value is 0. 0 means no minimum.",
|
||||||
|
"minimum_latency_in_ticks": 0,
|
||||||
|
|
||||||
|
"_comment_max_heartbeats_per_second": "Network tick rate. Maximum rate game updates packets are sent at before bundling them together. Minimum value is 6, maximum value is 240.",
|
||||||
|
"max_heartbeats_per_second": 60,
|
||||||
|
|
||||||
|
"_comment_ignore_player_limit_for_returning_players": "Players that played on this map already can join even when the max player limit was reached.",
|
||||||
|
"ignore_player_limit_for_returning_players": false,
|
||||||
|
|
||||||
|
"_comment_allow_commands": "possible values are, true, false and admins-only",
|
||||||
|
"allow_commands": "admins-only",
|
||||||
|
|
||||||
|
"_comment_autosave_interval": "Autosave interval in minutes",
|
||||||
|
"autosave_interval": 10,
|
||||||
|
|
||||||
|
"_comment_autosave_slots": "server autosave slots, it is cycled through when the server autosaves.",
|
||||||
|
"autosave_slots": 5,
|
||||||
|
|
||||||
|
"_comment_afk_autokick_interval": "How many minutes until someone is kicked when doing nothing, 0 for never.",
|
||||||
|
"afk_autokick_interval": 5,
|
||||||
|
|
||||||
|
"_comment_auto_pause": "Whether should the server be paused when no players are present.",
|
||||||
|
"auto_pause": true,
|
||||||
|
|
||||||
|
"only_admins_can_pause_the_game": true,
|
||||||
|
|
||||||
|
"_comment_autosave_only_on_server": "Whether autosaves should be saved only on server or also on all connected clients. Default is true.",
|
||||||
|
"autosave_only_on_server": true,
|
||||||
|
|
||||||
|
"_comment_non_blocking_saving": "Highly experimental feature, enable only at your own risk of losing your saves. On UNIX systems, server will fork itself to create an autosave. Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.",
|
||||||
|
"non_blocking_saving": false,
|
||||||
|
|
||||||
|
"_comment_segment_sizes": "Long network messages are split into segments that are sent over multiple ticks. Their size depends on the number of peers currently connected. Increasing the segment size will increase upload bandwidth requirement for the server and download bandwidth requirement for clients. This setting only affects server outbound messages. Changing these settings can have a negative impact on connection stability for some clients.",
|
||||||
|
"minimum_segment_size": 25,
|
||||||
|
"minimum_segment_size_peer_count": 20,
|
||||||
|
"maximum_segment_size": 100,
|
||||||
|
"maximum_segment_size_peer_count": 10
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user