Add Docker, Woodpecker CI/CD, and cleanup
ci/woodpecker/manual/woodpecker Pipeline was successful

- Add Dockerfile and .dockerignore for containerisation
- Add .woodpecker.yml pipeline (build + deploy to yugioh network on .101)
- Add .gitignore to stop tracking .env; replace with .env.example
- Add npm start script
- Fix index.js: move versionRoutes require before listen, add /health endpoint
- Fix git remote push URLs (were pointing at Dashboard repo)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 20:48:35 +02:00
parent 3996eaec45
commit 5a1607c106
7 changed files with 50 additions and 11 deletions
+28
View File
@@ -0,0 +1,28 @@
when:
branch: main
event: [push, manual]
steps:
- name: build
image: docker:cli
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- docker build -t yugioh-api:latest .
- name: deploy
image: docker:cli
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/docker/yugioh/.env:/opt/docker/yugioh/.env
commands:
- sed "s/='\(.*\)'$/=\1/; s/=\"\(.*\)\"$/=\1/" /opt/docker/yugioh/.env > /tmp/yugioh-api.env
- docker stop yugioh-api || true
- docker rm yugioh-api || true
- docker network create yugioh || true
- docker run -d
--name yugioh-api
--restart unless-stopped
--network yugioh
--env-file /tmp/yugioh-api.env
yugioh-api:latest