Refactor .woodpecker.yml for streamlined deployment and simplify Dockerfile health check
This commit is contained in:
@ -1,35 +1,21 @@
|
|||||||
steps:
|
name: deploy
|
||||||
- name: build
|
|
||||||
image: node:20-alpine
|
|
||||||
pull: true
|
|
||||||
commands:
|
|
||||||
- npm ci
|
|
||||||
- npm run build
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
include:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- push
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: deploy
|
steps:
|
||||||
image: flyio/flyctl:latest
|
deploy:
|
||||||
pull: true
|
image: node:20
|
||||||
depends_on:
|
environment:
|
||||||
- build
|
FLY_API_TOKEN:
|
||||||
secrets:
|
from_secret: FLY_API_TOKEN
|
||||||
- fly_api_token
|
|
||||||
commands:
|
commands:
|
||||||
- flyctl deploy --remote-only --config ./fly.toml
|
- curl -L https://fly.io/install.sh | sh
|
||||||
when:
|
- export PATH="$HOME/.fly/bin:$PATH"
|
||||||
branch:
|
- flyctl deploy --config fly.toml --app gallus-pub
|
||||||
include:
|
|
||||||
- main
|
when:
|
||||||
event:
|
branch:
|
||||||
include:
|
- main
|
||||||
- push
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
mount:
|
mount:
|
||||||
|
|||||||
@ -17,4 +17,3 @@ CMD ["serve", "-s", "dist", "-l", "3000"]
|
|||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||||
CMD wget -qO- http://localhost:3000/ || exit 1
|
CMD wget -qO- http://localhost:3000/ || exit 1
|
||||||
calhost:3000/ || exit 1
|
|
||||||
Reference in New Issue
Block a user