This commit is contained in:
@@ -19,7 +19,7 @@ steps:
|
|||||||
- cd /app # Navigate to the mounted project directory.
|
- cd /app # Navigate to the mounted project directory.
|
||||||
# Configure Git to trust the mounted directory to avoid 'unsafe repository' warnings.
|
# Configure Git to trust the mounted directory to avoid 'unsafe repository' warnings.
|
||||||
- git config --global --add safe.directory /app
|
- git config --global --add safe.directory /app
|
||||||
- git pull # Pull the latest changes from the 'main' branch.
|
- git pull # Pulls the latest changes from the tracking branch.
|
||||||
- echo "Source code updated."
|
- echo "Source code updated."
|
||||||
|
|
||||||
- name: manage-bot-containers # Step 2: Manage your bot's Docker containers.
|
- name: manage-bot-containers # Step 2: Manage your bot's Docker containers.
|
||||||
@@ -31,10 +31,10 @@ steps:
|
|||||||
# Mount your Docker Compose project directory into the container.
|
# Mount your Docker Compose project directory into the container.
|
||||||
- /home/gary/Discord/Acrybot:/app
|
- /home/gary/Discord/Acrybot:/app
|
||||||
environment:
|
environment:
|
||||||
# IMPORTANT: Explicitly set the Docker Compose project name.
|
# IMPORTANT: Explicitly set the Docker Compose project name to lowercase.
|
||||||
# This ensures containers are managed with the 'Acrybot' prefix,
|
# This ensures containers are managed with the 'acrybot' prefix,
|
||||||
# matching your existing containers.
|
# matching your existing containers.
|
||||||
COMPOSE_PROJECT_NAME: acrybot
|
COMPOSE_PROJECT_NAME: acrybot # Changed to lowercase 'acrybot'
|
||||||
commands:
|
commands:
|
||||||
- echo "--- Stopping Discord bot service python-app ---"
|
- echo "--- Stopping Discord bot service python-app ---"
|
||||||
# Stop the specific Discord bot service using the unhyphenated 'docker compose'.
|
# Stop the specific Discord bot service using the unhyphenated 'docker compose'.
|
||||||
@@ -47,6 +47,8 @@ steps:
|
|||||||
- docker compose up -d python-app --build
|
- docker compose up -d python-app --build
|
||||||
|
|
||||||
- echo "--- Verifying bot status ---"
|
- echo "--- Verifying bot status ---"
|
||||||
# Get the container ID of the bot service to inspect its status and logs
|
# Directly check the status of the service using docker compose ps
|
||||||
- echo "--- Logs of Discord bot container (if it exited) ---"
|
- docker compose ps python-app
|
||||||
- docker logs "${BOT_CONTAINER_ID}" # Fetch the logs of the bot container
|
- echo "--- Logs of Discord bot service ---"
|
||||||
|
# Fetch the logs of the bot service using docker compose logs
|
||||||
|
- docker compose logs python-app
|
||||||
|
|||||||
Reference in New Issue
Block a user