Inceptum/docs/Syncing.md

58 lines
2.0 KiB
Markdown
Raw Permalink Normal View History

2022-01-20 18:13:37 +01:00
# Syncing instances
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
Inceptum supports syncing repositories between instances through git.
This is roughly comparable to updatable modpacks in other launchers.
There are two workflows for this, you can choose one based on your use case.
## Uploading a local pack to a game server
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
This approach assumes that your intention is to have a game server running Inceptum
and to regularly push updates built and tested in an Inceptum instance on your PC.
To set this up, initialize a repo on your server and clone it locally
Server:
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
```shell
cd /srv/inceptum/instances
mkdir icesrv
cd icesrv
git init
git config receive.denyCurrentBranch ignore
```
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
Client:
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
```shell
git clone inceptum@example.com:/srv/inceptum/instances/icesrv
cd icesrv
git branch --set-upstream-to origin/master
# copy your instance content to your new instance
git add .
git commit -m "Initial commit"
git push
```
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
After that, you can use a script similar to the following to push changes:
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
```shell
git push -u origin master
rconc icesrv stop
sleep 1
ssh -t inceptum@example.com "cd /srv/inceptum/instances/icesrv; git reset --hard"
ssh -t admin@example.com "sudo systemctl restart inceptum-icesrv"
```
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
icesrv is the name of the instance in this example and inceptum-icesrv is a systemd service based on the one included
in the AUR package.
## Providing a pack to multiple users
2022-09-04 21:21:24 +02:00
2022-01-20 18:13:37 +01:00
To do this, create a new repository on a git hosting site (like GitHub or GitLab) and push your local instance there.
Since a git repository is created for every instance, simply following the instructions for pushing an existing
repository or using any graphical tool is enough to set this up.
Users can add an instance created this way in the GUI under File->New Instance->Inceptum.
To update the pack, simply create a new commit and push it to your repository.
2022-09-06 16:03:17 +02:00
Users can then update the pack by pulling the changes into their instance directory through the normal git CLI.
2022-01-20 18:13:37 +01:00
You may also export the pack to other formats to upload it on sites like CurseForge