mirror of
https://github.com/makayabou/asg-server.git
synced 2026-05-02 17:43:36 +02:00
[package] use curl for healthcheck
This commit is contained in:
parent
c72bba5da1
commit
c6fe84d730
6
Makefile
6
Makefile
@ -48,10 +48,10 @@ docker-build:
|
||||
docker build -f build/package/Dockerfile -t $(image_name) --build-arg APP=$(project_name) .
|
||||
|
||||
docker:
|
||||
docker-compose -f deployments/docker-compose/docker-compose.yml up --build
|
||||
docker compose -f deployments/docker-compose/docker-compose.yml up --build
|
||||
|
||||
docker-dev:
|
||||
docker-compose -f deployments/docker-compose/docker-compose.dev.yml up --build
|
||||
docker compose -f deployments/docker-compose/docker-compose.dev.yml up --build
|
||||
|
||||
api-docs:
|
||||
swag fmt -g ./cmd/$(project_name)/main.go \
|
||||
@ -61,6 +61,6 @@ view-docs:
|
||||
php -S 127.0.0.1:8080 -t ./api
|
||||
|
||||
clean:
|
||||
docker-compose -f deployments/docker-compose/docker-compose.yml down --volumes
|
||||
docker compose -f deployments/docker-compose/docker-compose.yml down --volumes
|
||||
|
||||
.PHONY: init init-dev air db-upgrade db-upgrade-raw run test build install docker docker-dev api-docs view-docs clean
|
||||
@ -33,7 +33,8 @@ FROM alpine:3 AS prod
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache tzdata
|
||||
RUN apk add --no-cache tzdata \
|
||||
curl
|
||||
|
||||
COPY scripts/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
@ -43,6 +44,6 @@ COPY --from=build /go/src/app /app
|
||||
EXPOSE 3000
|
||||
|
||||
USER guest
|
||||
HEALTHCHECK --interval=10s --timeout=3s --retries=3 --start-period=5s CMD /app/app health || exit 1
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 CMD curl -fs http://localhost:3000/health
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user