Deploying File Server and Password Manager
OCIS Deployment
| |
.DS_Store
secrets.*
!secrets.dev
data.dev
backup.dev
.env.testing
testing.compose.ymlYOUR_SECRET_ADMIN_PASSWORD | |
| |
| |
Vaultwarden Deployment
Your task: Create a deployment for Vaultwarden
- This is the documentation for deployments with compose: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose
- This is the documentation for the environment variables: https://github.com/dani-garcia/vaultwarden/blob/main/.env.template
- Use the same labels for configuring Caddy as with OCIS. A custom Caddyfile is not needed and no adaptions on the Caddy service should be neccessary.
- Mount the data directory similar to OCIS
- Configure the
DOMAINenvironment variable and theADMIN_TOKEN. When the admin token is encrypted with argon2, a secret file is not neccessary. - Find the environment variables to disable sign ups, verifying invitations, invitations and password hints
Automated Backups
| |
YOUR_SECRET_RESTIC_PASSWORD | |
| |
| |
Your task:
Add the same labels to the vaultwarden container
Create some testing data in OCIS and vaultwarden
Create a manual backup by running:
./dev.compose.yml exec stack-back rcb backupDelete the testing data in OCIS and vaultwarden
Shutdown the services using
./dev.compose.yml stop ocis vaultwardenRestore the backup by running:
./dev.compose.yml exec stack-back restic snapshots # find the latest snapshot ID and replace <LATEST_SNAPSHOT_ID> in the next command ./dev.compose.yml exec stack-back restic restore -t /srv/restic-repo/restored-files <LATEST_SNAPSHOT_ID>Find the restored directories in
restored-filesin the backup dirMove the OCIS and Vaultwarden files from the
restored-filesto the data dir. Make sure to delete the data dirs before coping the restored files to prevent mixing them. Also make sure the paths are exactly the same and only the content changed.Restart the services using
./dev.compose.yml start ocis vaultwardenVerify that the data was restored
Create a README file:
| |
Deploy to Production
Adapt the env files for prod and push everything to the Git repository. On the Raspberry Pi execute:
./prod.compose.yml down
git pull
./prod.compose.yml up -dVerify that OCIS and Vaultwarden are working as expected.
The final repository should look like this: https://codeberg.org/luca-heitmann/homelab-playground