Multiple changes
This commit is contained in:
parent
d66df792c6
commit
63165795ca
24
app/scripts/healthchecker.sh
Executable file
24
app/scripts/healthchecker.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Check if nginx is running
|
||||||
|
/etc/init.d/nginx status >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
NGINX="nginx failed!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if MariaDB is running
|
||||||
|
/etc/init.d/mariadb status >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
MARIADB="mariadb failed!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if PHP-FPM is running
|
||||||
|
/etc/init.d/php8.2-fpm status >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
PHP82="php8.2-fpm failed!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$NGINX$MARIADB$PHP82" ]; then
|
||||||
|
echo "$NGINX $MARIADB $PHP82" && exit 1
|
||||||
|
fi
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
apt-get install php8.2 php8.2-common php8.2-fpm -y # PHP
|
apt-get install php8.2 php8.2-common php8.2-fpm -y # PHP
|
||||||
apt-get install vim file bash-completion procps nginx screen git less -y # Utils
|
apt-get install vim file bash-completion procps nginx screen git sudo less -y # Utils
|
||||||
apt-get install mariadb-client mariadb-server -y # MariaDB Server + Client
|
apt-get install mariadb-client mariadb-server -y # MariaDB Server + Client
|
13
dockerfile
13
dockerfile
@ -1,14 +1,14 @@
|
|||||||
FROM debian:bookworm
|
FROM debian:bookworm
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app/scripts
|
||||||
|
|
||||||
COPY app /app
|
COPY app /app
|
||||||
|
|
||||||
RUN apt-get update && apt-get full-upgrade -y
|
RUN apt-get update && apt-get full-upgrade -y && apt-get autoremove -y && apt-get autoclean -y
|
||||||
|
|
||||||
RUN /app/sury-php-repo.sh
|
#RUN /app/scripts/sury-php-repo.sh
|
||||||
|
|
||||||
RUN /app/install-dependencies.sh
|
RUN /app/scripts/install-dependencies.sh
|
||||||
|
|
||||||
ENV PORT=8080
|
ENV PORT=8080
|
||||||
|
|
||||||
@ -16,4 +16,7 @@ EXPOSE 8080
|
|||||||
|
|
||||||
#CMD ["/app/launch-daemons.sh"]
|
#CMD ["/app/launch-daemons.sh"]
|
||||||
|
|
||||||
ENTRYPOINT ["/app/launch-daemons.sh"]
|
ENTRYPOINT ["/app/scripts/launch-daemons.sh"]
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=5m --timeout=30s \
|
||||||
|
CMD /app/scripts/healthchecker.sh || exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user