From bb94ff6245beddd127581eed002d954d356ed4e7 Mon Sep 17 00:00:00 2001 From: ddc Date: Wed, 18 Feb 2026 14:45:02 -0300 Subject: [PATCH 1/2] v3.0.3 --- utilities/restart.sh | 10 ---------- utilities/start.sh | 11 +++++++++++ utilities/update.sh | 15 +++++++++++---- 3 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 utilities/restart.sh create mode 100644 utilities/start.sh diff --git a/utilities/restart.sh b/utilities/restart.sh deleted file mode 100644 index 2d80d0a9..00000000 --- a/utilities/restart.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -PROJECT_DIR=/opt/DiscordBot -pushd "$PROJECT_DIR" || exit - -docker compose down -docker rmi "$(docker images 'discordbot*' -a -q)" -f -docker compose up -d --build --force-recreate - -popd || exit diff --git a/utilities/start.sh b/utilities/start.sh new file mode 100644 index 00000000..cab1c2ab --- /dev/null +++ b/utilities/start.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -euo pipefail + +PROJECT_DIR=/opt/DiscordBot +pushd "$PROJECT_DIR" > /dev/null + +docker compose down +docker images 'discordbot*' -a -q | xargs -r docker rmi -f +docker compose up -d --build --force-recreate + +popd > /dev/null diff --git a/utilities/update.sh b/utilities/update.sh index 6365a863..33c79938 100644 --- a/utilities/update.sh +++ b/utilities/update.sh @@ -1,16 +1,23 @@ #!/usr/bin/env bash +set -euo pipefail PROJECT_USERNAME=ddc PROJECT_DIR=/opt/DiscordBot -pushd "$PROJECT_DIR" || exit +pushd "$PROJECT_DIR" > /dev/null # update project git fetch --all git reset --hard origin/master # change perms -sudo chown -R $PROJECT_USERNAME:$PROJECT_USERNAME "$PROJECT_DIR" && \ -sudo chmod -R 0755 "$PROJECT_DIR" +sudo chown -R "$PROJECT_USERNAME":"$PROJECT_USERNAME" "$PROJECT_DIR" +sudo find "$PROJECT_DIR" -type d -exec chmod 755 {} + +sudo find "$PROJECT_DIR" -type f -exec chmod 644 {} + +sudo chmod 600 "$PROJECT_DIR/.env" +sudo chmod 755 "$PROJECT_DIR/utilities"/*.sh -popd || exit +# ensure logs dir is writable by container's botuser (uid 1000) +sudo chown 1000:1000 "$PROJECT_DIR/logs" + +popd > /dev/null From 0e47ab6b551ea082b8ad14ff0fd8574d0bd4a146 Mon Sep 17 00:00:00 2001 From: ddc Date: Wed, 18 Feb 2026 14:47:21 -0300 Subject: [PATCH 2/2] v3.0.3 --- .github/PULL_REQUEST_TEMPLATE | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index e1ae10c6..810d4905 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -3,14 +3,14 @@ ## Checklist -- [ ] If code changes were made, then they have been tested -- [ ] I have updated the documentation to reflect any changes made -- [ ] I have thought about how this code may affect other services -- [ ] This PR fixes an issue -- [ ] This PR is a breaking change (e.g. method, parameters, env variables) -- [ ] This PR adds something new (e.g. method, parameters, env variables) -- [ ] This PR change unit and integration tests -- [ ] This PR is **NOT** a code change (e.g. documentation, packages) +- [] If code changes were made, then they have been tested +- [] I have updated the documentation to reflect any changes made +- [] I have thought about how this code may affect other services +- [] This PR fixes an issue +- [] This PR is a breaking change (e.g. method, parameters, env variables) +- [] This PR adds something new (e.g. method, parameters, env variables) +- [] This PR change unit and integration tests +- [] This PR is **NOT** a code change (e.g. documentation, packages) ## Reviewer -- [ ] I understand that approving this code, I am also responsible for it going into the codebase +- [] I understand that approving this code, I am also responsible for it going into the codebase