Go to file
Daniel Meiburg 532ff91f5d
authentik: update to 2024.10
2024-11-22 12:05:33 +01:00
audiobookshelf disable all services and rencrypt env files for new server 2024-03-22 21:16:33 +01:00
authentik authentik: update to 2024.10 2024-11-22 12:05:33 +01:00
caddy owncloud: add 2024-03-25 18:30:02 +01:00
forgejo forgejo: rewrite login url to force sso 2024-04-19 16:59:14 +02:00
freshrss disable all services and rencrypt env files for new server 2024-03-22 21:16:33 +01:00
gitea disable all services and rencrypt env files for new server 2024-03-22 21:16:33 +01:00
grafana-influx grafana-influx: disable 2024-08-21 20:49:45 +02:00
grist grist: disable 2024-08-21 21:04:17 +02:00
mail disable all services and rencrypt env files for new server 2024-03-22 21:16:33 +01:00
nextcloud owncloud: enable; nextcloud: disable 2024-08-21 22:47:33 +02:00
nginx-proxy disable all services and rencrypt env files for new server 2024-03-22 21:16:33 +01:00
owncloud owncloud disabled 2024-10-19 16:39:50 +02:00
portainer Implement enabled switch for post-receive. Disable portainer. 2023-02-15 22:01:57 +01:00
seafile disable seafile 2024-03-26 00:51:51 +01:00
watchtower disable all services and rencrypt env files for new server 2024-03-22 21:16:33 +01:00
whoami authentik: reconfigure and anable for caddy 2024-03-22 23:53:51 +01:00
.gitignore Update README 2023-02-11 23:57:05 +01:00
README.md README: add troubleshooting 2024-03-22 22:08:52 +01:00
post-receive Implement enabled switch for post-receive. Disable portainer. 2023-02-15 22:01:57 +01:00

README.md

Container

This project contains my personal docker compose configurations.

Operating principle:

Changes in this repo get pushed to a bare repo on dmeiburg.de. Whenever a push is received a post-receive hook runs.

The post-receive hook then:

  • deploys the code into a working directory
  • decrypts .env.gpg files
  • restarts stacks with changed compose files

The env files are encrypted for key@dmeiburg.de and server@dmeiburg.de.

Server setup

# create bare repo on dm@dmeiburg.de
mkdir -p git/container.git
cd git/container.git
git init --bare

# create and checkout working dir
cd && git clone ~/git/container.git
cd ~/container && git checkout main # might not be needed or needs to be master
# install the post receive hook, by using this command on the local machine
# whenever the hook is edited, this command has to be used again
scp post-receive dm@dmeiburg:~/git/container.git/hooks/

Local setup

# add bare repo as remote on local machine
git remote add dmeiburg ssh://dm@dmeiburg.de:/dm/git/container.git

Encrypting .env files

To encrypt an .env files, the following command is used:

$ gpg -er key@dmeiburg.de -r dm@dmeiburg.de .env

It's assumed dm@dmeiburg.de is a public gpg key for the server.

Deployment

git push dmeiburg

If necessary the post-receive hook has to be updated via scp.

Troubleshooting

If this setup is recreated there might be an issue with the bare repo on the server assuming that we are using a master branch, when we instead have a main branch. This issue might present itself, if the post-receive hook outputs

remote: fatal: You are on a branch yet to be born

We can fix this by editing the HEAD file in the bare repo to contain this line:

ref: refs/heads/main > HEAD