kind: pipeline type: docker # Essential for Docker execution name: restart-discord-bot trigger: branch: - main event: - push steps: - name: restart-bot image: docker/compose:latest # Image with Docker Compose volumes: # Explicitly mounting docker_sock for this step's container - name: docker_sock path: /var/run/docker.sock # Mounting the docker-compose.yml directory - name: docker_compose_dir path: /app # Mount point inside the container commands: - cd /app # Execute the Docker Compose command # IMPORTANT: Replace 'your_bot_service_name' with your actual service name. - docker compose restart your_bot_service_name # Uncomment the line below if you use older Docker Compose (with a hyphen) # - docker-compose restart your_bot_service_name # Define the host paths for the named volumes. # These global volume definitions are used by the steps above. volumes: - name: docker_sock # Refers to the docker_sock volume used in steps host: path: /var/run/docker.sock # Actual path on your host for the Docker socket - name: docker_compose_dir # Refers to the docker_compose_dir volume used in steps host: path: /home/gary/Discord/Acrybot # Your actual path on the host for docker-compose.yml