-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Related to #142
- Loading branch information
Showing
17 changed files
with
388 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,19 @@ jobs: | |
# https://github.com/NixOS/nix/issues/8881 | ||
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-restic-test | ||
|
||
nix-flake-check-lab-sftpgo: | ||
# Run after flake check | ||
needs: [nix-flake-check-no-build] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: DeterminateSystems/nix-installer-action@v13 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v7 | ||
- name: nix build | ||
# nix flake check doesn't have a way to specify a specific test to run | ||
# https://github.com/NixOS/nix/issues/8881 | ||
run: nix build --option sandbox false --print-build-logs .#checks.x86_64-linux.lab-sftpgo-test | ||
|
||
nix-flake-check-vps-wagtail: | ||
# Run after flake check | ||
needs: [nix-flake-check-no-build] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-FileCopyrightText: Andrew Hayzen <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
services: | ||
rathole: | ||
links: | ||
- sftpgo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# SPDX-FileCopyrightText: Andrew Hayzen <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
services: | ||
sftpgo: | ||
image: docker.io/drakkan/sftpgo:v2.6.2@sha256:05b8e197e796366f955a3816b42a8ed29a9ef400c0da23ecc62bbc22748d4ab8 | ||
environment: | ||
# Allow for connections to continue for 5s before killing | ||
SFTPGO_GRACE_TIME: 5 | ||
# Disable SFTP | ||
SFTPGO_SFTPD__BINDINGS__0__PORT: 0 | ||
expose: | ||
- 8080 | ||
restart: unless-stopped | ||
volumes: | ||
# SFTP backups | ||
- /mnt/mapping-data-user1000/app/sftpgo/backups:/srv/sftpgo/backups | ||
# SFTPGo home | ||
- /mnt/mapping-data-user1000/user:/srv/sftpgo/data | ||
# SFTP settings | ||
- /var/lib/docker-compose-runner-user1000/sftpgo:/var/lib/sftpgo | ||
# Other data | ||
- /mnt/mapping-data-user1000/camera:/mnt/data/camera:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# SPDX-FileCopyrightText: Andrew Hayzen <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
{ config, options, lib, pkgs, ... }: | ||
{ | ||
options.ahayzen.lab.sftpgo = lib.mkOption { | ||
default = true; | ||
type = lib.types.bool; | ||
}; | ||
|
||
config = lib.mkIf (config.ahayzen.lab.sftpgo) { | ||
ahayzen = { | ||
docker-compose-files = [ ./compose.sftpgo.yml ]; | ||
|
||
# Take a snapshot of the database daily | ||
periodic-daily-commands = [ | ||
''/run/wrappers/bin/sudo --user=unpriv ${pkgs.sqlite}/bin/sqlite3 /var/lib/docker-compose-runner/sftpgo/sftpgo.db ".backup /var/lib/docker-compose-runner/sftpgo/sftpgo-snapshot-$(date +%w).db"'' | ||
]; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,7 @@ | |
immich = false; | ||
rathole = true; | ||
restic = false; | ||
sftpgo = false; | ||
}; | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,7 @@ | |
immich = false; | ||
rathole = true; | ||
restic = false; | ||
sftpgo = false; | ||
}; | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,7 @@ | |
immich = true; | ||
rathole = true; | ||
restic = false; | ||
sftpgo = false; | ||
}; | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
immich = false; | ||
rathole = false; | ||
restic = true; | ||
sftpgo = false; | ||
}; | ||
}; | ||
|
||
|
Oops, something went wrong.