- 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:
@@ -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
|
||||
Reference in New Issue
Block a user