mirror of
https://github.com/makayabou/asg-server.git
synced 2026-05-02 17:43:36 +02:00
[docker] fix healthcheck
This commit is contained in:
parent
4c45ea1a81
commit
05661032b3
@ -45,3 +45,7 @@ LICENSE
|
||||
|
||||
# Ignore the Go build directory
|
||||
tmp/
|
||||
|
||||
# Ignore build and deployments directories
|
||||
deployments/
|
||||
build/
|
||||
@ -4,7 +4,7 @@
|
||||
@phone={{$dotenv PHONE}}
|
||||
|
||||
###
|
||||
GET http://localhost:3000/health HTTP/1.1
|
||||
GET {{baseUrl}}/health HTTP/1.1
|
||||
|
||||
###
|
||||
GET {{baseUrl}}/api/3rdparty/v1/health HTTP/1.1
|
||||
|
||||
@ -46,6 +46,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" ]
|
||||
HEALTHCHECK --interval=10s --timeout=3s --retries=3 --start-period=5s CMD /app/app health || exit 1
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
version: '3'
|
||||
services:
|
||||
backend:
|
||||
image: capcom6/sms-gateway
|
||||
@ -8,7 +7,7 @@ services:
|
||||
args:
|
||||
- APP=sms-gateway
|
||||
environment:
|
||||
- DEBUG=1
|
||||
- DEBUG=
|
||||
- CONFIG_PATH=config.yml
|
||||
- GOOSE_DBSTRING=sms:sms@tcp(db:3306)/sms
|
||||
- HTTP__LISTEN=0.0.0.0:3000
|
||||
@ -21,21 +20,22 @@ services:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ../../configs/config.yml:/app/config.yml:ro
|
||||
restart: 'no'
|
||||
restart: 'unless-stopped'
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
db:
|
||||
image: mariadb:10.6
|
||||
image: mariadb:10.11
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=root
|
||||
- MYSQL_DATABASE=sms
|
||||
- MYSQL_USER=sms
|
||||
- MYSQL_PASSWORD=sms
|
||||
- MARIADB_AUTO_UPGRADE=1
|
||||
volumes:
|
||||
- mariadb-data:/var/lib/mysql
|
||||
restart: 'no'
|
||||
restart: 'unless-stopped'
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user