Edits
This commit is contained in:
@@ -1,45 +1,35 @@
|
|||||||
kind: pipeline # Defines this as a Woodpecker CI pipeline.
|
kind: pipeline
|
||||||
type: docker # Specifies that this pipeline will execute commands using Docker.
|
type: docker
|
||||||
name: restart-discord-bot # A descriptive name for your pipeline.
|
name: restart-discord-bot
|
||||||
|
|
||||||
# Defines when this pipeline should be triggered.
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main # This pipeline will only run when changes are pushed to the 'main' branch.
|
- main
|
||||||
event:
|
event:
|
||||||
- push # The pipeline is triggered specifically by a 'push' event.
|
- push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: restart-bot # Name of this specific step in the pipeline.
|
- name: test-compose-access
|
||||||
image: docker/compose:latest # Uses a Docker Compose-enabled image.
|
image: docker/compose:latest
|
||||||
# This volume mount allows the Docker Compose CLI inside the Woodpecker agent container
|
|
||||||
# to communicate with the Docker daemon on the host machine.
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker_sock # A named volume for the Docker socket.
|
- name: docker_sock
|
||||||
host:
|
path: /var/run/docker.sock
|
||||||
path: /var/run/docker.sock # Maps the Docker socket from the host into the container.
|
- name: docker_compose_dir
|
||||||
- name: docker_compose_dir # A named volume for your Docker Compose project directory.
|
path: /app
|
||||||
host:
|
commands:
|
||||||
# IMPORTANT: Replace '/path/to/your/bot/docker-compose' with the actual absolute path
|
- ls -la /app # List contents of the mounted directory
|
||||||
# on your host machine where your docker-compose.yml file is located.
|
- docker --version # Check if Docker CLI is available
|
||||||
path: /home/gary/Discord/Acrybot
|
- docker compose version # Check Docker Compose version
|
||||||
commands:
|
- cd /app
|
||||||
# Navigate into the directory where the docker-compose.yml file is mounted.
|
- pwd # Print current working directory
|
||||||
- cd /home/gary/Discord/Acrybot
|
- ls # List files in the current directory (should see docker-compose.yml)
|
||||||
# The command to restart your Discord bot service using Docker Compose.
|
# Temporarily comment out the restart command until previous ones succeed
|
||||||
# IMPORTANT: Replace 'your_bot_service_name' with the actual service name
|
# - docker compose restart your_bot_service_name
|
||||||
# defined in your docker-compose.yml file.
|
|
||||||
# Use 'docker compose' for newer Docker versions (v2) or 'docker-compose' for older ones.
|
|
||||||
- docker compose restart python-app
|
|
||||||
# - docker-compose restart your_bot_service_name # Uncomment this line if you use older Docker Compose.
|
|
||||||
|
|
||||||
# Defines the volumes that are available to the steps in this pipeline.
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker_sock # A named volume for the Docker socket.
|
- name: docker_sock
|
||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock # Maps the Docker socket from the host into the container.
|
path: /var/run/docker.sock
|
||||||
- name: docker_compose_dir # A named volume for your Docker Compose project directory.
|
- name: docker_compose_dir
|
||||||
host:
|
host:
|
||||||
# IMPORTANT: Replace '/path/to/your/bot/docker-compose' with the actual absolute path
|
path: /home/gary/Discord/Acrybot # Updated path to your Docker Compose directory
|
||||||
# on your host machine where your docker-compose.yml file is located.
|
|
||||||
path: /home/gary/Discord/Acrybot
|
|
||||||
|
|||||||
Reference in New Issue
Block a user