5a1607c106
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>
29 lines
786 B
YAML
29 lines
786 B
YAML
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
|