Compare commits
2 Commits
499b0f4334
...
9818771f7c
| Author | SHA1 | Date | |
|---|---|---|---|
| 9818771f7c | |||
| f7af96c497 |
@@ -160,10 +160,10 @@
|
|||||||
"-l=homepage.widget.type=scrutiny"
|
"-l=homepage.widget.type=scrutiny"
|
||||||
"-l=homepage.widget.url=http://scrutiny:8080"
|
"-l=homepage.widget.url=http://scrutiny:8080"
|
||||||
"--cap-add=SYS_RAWIO"
|
"--cap-add=SYS_RAWIO"
|
||||||
"--device=/dev/sda:/dev/sda"
|
"--device=/dev/disk/by-id/wwn-0x5000cca26fca1aed:/dev/disk/by-id/wwn-0x5000cca26fca1aed"
|
||||||
"--device=/dev/sdb:/dev/sdb"
|
"--device=/dev/disk/by-id/wwn-0x5000cca26fef696c:/dev/disk/by-id/wwm-0x5000cca26fef696c"
|
||||||
"--device=/dev/sdc:/dev/sdc"
|
"--device=/dev/disk/by-id/wwn-0x5000cca270db1d0e:/dev/disk/by-id/wwn-0x5000cca270db1d0e"
|
||||||
"--device=/dev/sdd:/dev/sdd"
|
# "--device=/dev/sdd:/dev/sdd" Removing this one while the disk is down
|
||||||
];
|
];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/run/udev:/run/udev:ro"
|
"/run/udev:/run/udev:ro"
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ in
|
|||||||
"dm-companion-pocketbase"
|
"dm-companion-pocketbase"
|
||||||
];
|
];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/tank/web/dm.terakoda.com/dist:/usr/share/nginx/html:ro"
|
"/tank/web/dm.terakoda.com/deployed:/usr/share/nginx/html:ro"
|
||||||
"${nginxConf}:/etc/nginx/nginx.conf:ro"
|
"${nginxConf}:/etc/nginx/nginx.conf:ro"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,10 +8,11 @@ let
|
|||||||
writeShellScript "migrate-pocketbase" ''
|
writeShellScript "migrate-pocketbase" ''
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
id
|
echo "Migrating in $(pwd) as $(id)"
|
||||||
pwd
|
|
||||||
|
|
||||||
${pkgs.pocketbase}/bin/pocketbase migrate up
|
${pkgs.pocketbase}/bin/pocketbase migrate up
|
||||||
|
|
||||||
|
echo "Migration complete"
|
||||||
'';
|
'';
|
||||||
deployNpmApp =
|
deployNpmApp =
|
||||||
with pkgs;
|
with pkgs;
|
||||||
@@ -26,10 +27,12 @@ let
|
|||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
set -e
|
set -e
|
||||||
id
|
|
||||||
pwd
|
|
||||||
|
|
||||||
output_dir="./$(date --utc --iso-8601=seconds)"
|
echo "Deploying in $(pwd) as $(id)"
|
||||||
|
|
||||||
|
OUTPUT_DIR="./$(date --utc --iso-8601=seconds)"
|
||||||
|
|
||||||
|
echo "Deploying into $OUTPUT_DIR"
|
||||||
|
|
||||||
export GIT_SSH_COMMAND='ssh -v -o "UserKnownHostsFile ${gitKnownHosts}" -i "${
|
export GIT_SSH_COMMAND='ssh -v -o "UserKnownHostsFile ${gitKnownHosts}" -i "${
|
||||||
config.sops.secrets."deploy-key/mcp".path
|
config.sops.secrets."deploy-key/mcp".path
|
||||||
@@ -46,9 +49,12 @@ let
|
|||||||
|
|
||||||
# Use a local cache with --cache .npm
|
# Use a local cache with --cache .npm
|
||||||
npm ci --cache .npm
|
npm ci --cache .npm
|
||||||
npm run build -- --outDir "$output_dir"
|
npm run build -- --outDir "$OUTPUT_DIR"
|
||||||
|
|
||||||
|
echo "Activating $OUTPUT_DIR"
|
||||||
# Trailing slash on source to only copy contents, not the directory itself
|
# Trailing slash on source to only copy contents, not the directory itself
|
||||||
rsync --archive --delete "$output_dir"/ deployed
|
rsync --archive --delete "$OUTPUT_DIR"/ deployed
|
||||||
|
echo "Deployment complete"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user