clean: Remove nix + nginx dead code
Removed redundant nix and nginx configuration left over after consolidating the staging and prod configs.
This commit is contained in:
parent
ace57324b1
commit
e1801e257b
2 changed files with 4 additions and 168 deletions
21
deploy.sh
21
deploy.sh
|
|
@ -37,11 +37,8 @@ case $ENV in
|
|||
|
||||
# Set proper ownership
|
||||
sudo chown -R nginx:nginx ${STAGING_PATH}/
|
||||
|
||||
# Copy nginx config
|
||||
sudo cp -t /etc/nixos/ staging.nginx.nix
|
||||
|
||||
printf "✓ Staging deployment complete!\n Files deployed to: %s\n Nginx config: /etc/nixos/staging.nginx.nix\n\nTo activate, update your NixOS configuration to import staging.nginx.nix\nand run: sudo nixos-rebuild switch\n" "${STAGING_PATH}"
|
||||
|
||||
printf "✓ Staging deployment complete!\n Files deployed to: %s\n\nTo activate nginx, import staging.nginx.nix into your local NixOS config\nand run: sudo nixos-rebuild switch\n" "${STAGING_PATH}"
|
||||
;;
|
||||
|
||||
prod)
|
||||
|
|
@ -51,7 +48,6 @@ case $ENV in
|
|||
REMOTE_HOST="crossbox"
|
||||
REMOTE_USER="m3b"
|
||||
REMOTE_PATH="/srv/www/binning.net"
|
||||
REMOTE_NIXOS="/etc/nixos/"
|
||||
|
||||
# Check if SSH key is set up
|
||||
if ! ssh -o BatchMode=yes -o ConnectTimeout=5 ${REMOTE_USER}@${REMOTE_HOST} exit 2>/dev/null; then
|
||||
|
|
@ -67,17 +63,8 @@ case $ENV in
|
|||
ssh ${REMOTE_HOST} "sudo rsync -avz --delete /tmp/${REMOTE_PATH}/ ${REMOTE_PATH} && \
|
||||
sudo chown -R nginx:nginx ${REMOTE_PATH}/ && \
|
||||
printf 'Content deployed.\n'"
|
||||
|
||||
# Deploy nginx configuration
|
||||
printf "Deploying nginx configuration...\n"
|
||||
scp prod.nginx.nix ${REMOTE_HOST}:/tmp/nginx.nix
|
||||
|
||||
# Set proper permissions and move config on remote server
|
||||
ssh ${REMOTE_HOST} "sudo mv /tmp/nginx.nix ${REMOTE_NIXOS}nginx.nix && \
|
||||
sudo chown -R nginx:nginx ${REMOTE_PATH}/ && \
|
||||
printf 'Configuration deployed. Run sudo nixos-rebuild switch to activate.\n'"
|
||||
|
||||
printf "✓ Production deployment complete!\n\nSSH into %s and run: sudo nixos-rebuild switch\n" "${REMOTE_HOST}"
|
||||
|
||||
printf "✓ Production deployment complete!\n\nNginx configuration is managed by the nixos-config flake (hosts/crossbox/nginx.nix).\n" "${REMOTE_HOST}"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue