Compare commits

...

3 Commits

Author SHA1 Message Date
e26857f269 Rename token 2025-04-23 18:21:53 +00:00
03922e8849 Remove from watchtower updates 2025-01-31 21:51:55 +00:00
f2df4c9b43 Add docker scripts 2025-01-20 20:13:01 +00:00
6 changed files with 41 additions and 2 deletions

4
.gitignore vendored
View File

@@ -1,2 +1,2 @@
guptoken.py
*.pyc
*.pyc
gupbot/guptoken.py

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
# Use the official Python image
FROM python:3.10-slim
LABEL com.centurylinklabs.watchtower.enable="false"
# Set the working directory in the container
WORKDIR /gupbot
# Copy the application code into the container
ADD gupbot /gupbot
# Install required Python packages
RUN pip install --no-cache-dir discord.py
# Command to run your Python script
CMD ["python", "gupbot.py"]

22
build_gupbot.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
set -e
# Check if the container is running
if [ "$(docker ps -q -f name=gupbot)" ]; then
echo "Stopping the running container..."
docker stop gupbot
fi
# Check if the container exists (stopped or running)
if [ "$(docker ps -aq -f name=gupbot)" ]; then
echo "Removing the container..."
docker rm gupbot
fi
echo "Building the Docker image..."
docker build --network=host -t nalylab/gupbot .
echo "Running the Docker container..."
docker run --network=host --name=gupbot -d nalylab/gupbot