mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-07 21:01:37 +00:00
feat(Docker): Container healthchecks (#2951)
This commit is contained in:
@@ -4,6 +4,7 @@ services:
|
|||||||
|
|
||||||
ac-database:
|
ac-database:
|
||||||
image: azerothcore/database
|
image: azerothcore/database
|
||||||
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./docker/database/Dockerfile
|
dockerfile: ./docker/database/Dockerfile
|
||||||
@@ -22,6 +23,7 @@ services:
|
|||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
image: azerothcore/worldserver
|
image: azerothcore/worldserver
|
||||||
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: ./docker/worldserver
|
context: ./docker/worldserver
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@@ -47,6 +49,7 @@ services:
|
|||||||
|
|
||||||
ac-authserver:
|
ac-authserver:
|
||||||
image: azerothcore/authserver
|
image: azerothcore/authserver
|
||||||
|
restart: unless-stopped
|
||||||
build:
|
build:
|
||||||
context: ./docker/authserver
|
context: ./docker/authserver
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
|
|
||||||
# install the required dependencies to run the authserver
|
# install the required dependencies to run the authserver
|
||||||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev;
|
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev net-tools;
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=3 CMD netstat -lnpt | grep :3724 || exit 1
|
||||||
|
|
||||||
# run the authserver located in the directory "docker/authserver/bin" of the host machine
|
# run the authserver located in the directory "docker/authserver/bin" of the host machine
|
||||||
CMD ["/azeroth-server/bin/authserver"]
|
CMD ["/azeroth-server/bin/authserver"]
|
||||||
|
|||||||
@@ -24,3 +24,5 @@ COPY --from=builder /azerothcore/env/dist/sql /sql
|
|||||||
# adding the "generate-databases.sh" to the directory "/docker-entrypoint-initdb.d"
|
# adding the "generate-databases.sh" to the directory "/docker-entrypoint-initdb.d"
|
||||||
# because all scripts included in that directory will automatically be executed when the docker container starts
|
# because all scripts included in that directory will automatically be executed when the docker container starts
|
||||||
COPY docker/database/generate-databases.sh /docker-entrypoint-initdb.d
|
COPY docker/database/generate-databases.sh /docker-entrypoint-initdb.d
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=3 CMD mysqladmin ping -h localhost
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
|
|
||||||
# install the required dependencies to run the authserver
|
# install the required dependencies to run the authserver
|
||||||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev libreadline-dev;
|
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev libreadline-dev net-tools;
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=3 CMD netstat -lnpt | grep :8085 || exit 1
|
||||||
|
|
||||||
# run the worldserver located in the directory "docker/worldserver/bin" of the host machine
|
# run the worldserver located in the directory "docker/worldserver/bin" of the host machine
|
||||||
CMD ["/azeroth-server/bin/worldserver"]
|
CMD ["/azeroth-server/bin/worldserver"]
|
||||||
|
|||||||
Reference in New Issue
Block a user