Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<!-- What is this pull request for? Does it fix any issues? -->

## 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
10 changes: 0 additions & 10 deletions utilities/restart.sh

This file was deleted.

11 changes: 11 additions & 0 deletions utilities/start.sh
Original file line number Diff line number Diff line change
@@ -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
15 changes: 11 additions & 4 deletions utilities/update.sh
Original file line number Diff line number Diff line change
@@ -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