diff options
author | Matthew Lemon <y@yulqen.org> | 2024-12-31 16:12:42 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-12-31 16:12:42 +0000 |
commit | 38f02f15781eb251cfd94f6467d2fc8e7fdf9556 (patch) | |
tree | 1a8b680497238a46ecf47cb7dc17856f087dc878 /scripts | |
parent | c74ea9e6b4af97be26029334868fa3264032c2d3 (diff) |
More comprehensive cleanup and refactor
- **Removal of Unused Files and Directories:** Deleted multiple files and directories that were no longer in use, including configuration files (e.g., `.gitattributes`, `.gitlab-ci.yml`, Docker-related configurations, and documentation files).
- **Script and Build Configuration Cleanup:** Removed deployment scripts and Dockerfiles that were outdated, redundant, or no longer aligned with current project requirements.
- **Documentation Purge:** Cleared out the documentation directory, including various Sphinx configuration files and content, which are no longer deemed necessary for the project's current state.
- **Localization Files Delete:** Removed translation files across multiple languages that were not in use, streamlining localization efforts.
- **Test Files Deletion:** Cleaned up test-related files that had no relevance to the remaining codebase.
This clean-up aims to enhance project clarity, reduce unnecessary clutter, and set the stage for a more efficient development environment moving forward.
Diffstat (limited to '')
-rw-r--r-- | scripts/deploy.pl | 34 | ||||
-rwxr-xr-x | scripts/deploy.sh | 24 |
2 files changed, 0 insertions, 58 deletions
diff --git a/scripts/deploy.pl b/scripts/deploy.pl deleted file mode 100644 index 81f3957..0000000 --- a/scripts/deploy.pl +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env -S perl -w - -use warnings; -use strict; - -# Get environment variables from .env file -print "The .env-prod file is critical for the deployment.\n"; -print ".env file exists in the project directory.\n" if -e "../.env"; -print "It contains the following environment variables:\n\n"; - -my $live_db_url; -my $commented_db_url; - -open my $envf, "<", "../.env" or die "Cannot open .env file: $!"; -while ( my $line = <$envf>) { - # TODO fix this regex - it will omit commented lines to start with - if ($line =~ /^[A-Z_]+=/) { - if ($line =~ /^DATABASE_URL/) { - my @live_url = split(/=/, $line); - $live_db_url = $live_url[1]; - } - if ($line =~ /^#DATABASE_URL/) { - my @commented_url = split(/=/, $line); - $commented_db_url = $commented_url[1]; - } - print $line; - } -} - -print "\n\nDATABASE_URL is $live_db_url"; -print "\n\nCommented DATABASE_URL is $commented_db_url" if defined; - - -close($envf); diff --git a/scripts/deploy.sh b/scripts/deploy.sh deleted file mode 100755 index b7ecf74..0000000 --- a/scripts/deploy.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# Assign arguments to variables -IMAGE_NAME="pyblackbird" -TAG="latest" # Adjust tagging strategy as needed -DOCKER_REGISTRY="registry.gitlab.com/yulqen" # Docker registry URL - -SERVER_HOST="substracker-web" - -# SSH into server to pull the image, restart the container, and configure NGINX and Certbot -#ssh -i $SSH_KEY_PATH $SSH_USER@$SERVER_HOST << EOF -ssh $SERVER_HOST << EOF - -# Stop and remove the existing container if it exists -docker stop $IMAGE_NAME || true -docker rm $IMAGE_NAME || true -docker rmi $DOCKER_REGISTRY/$IMAGE_NAME:$TAG || true - -# run using the .env file for config settings -cd code/pyblackbird && docker run -d --rm --name pyblackbird --mount type=bind,src=/home/surge/code/pyblackbird/data,dst=/app/data --env-file .env -p 8080:8080 $DOCKER_REGISTRY/$IMAGE_NAME:$TAG - -EOF - -echo "Deployment complete." |