Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
BIND as DNS service added. Start PHP-FPM services again 5 seconds aft…
Browse files Browse the repository at this point in the history
…er the Froxlor cron job ran. Ko-fi button added to README.
  • Loading branch information
bloodhunterd committed Nov 5, 2020
1 parent 61eb1ff commit 668ac34
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## <a name="v1-1-0"></a> [1.1.0](/~https://github.com/bloodhunterd/froxlor-docker/releases/tag/1.1.0) - 05.11.2020

* Another possible fix to prevent failing PHP services on the first start up added
* Added BIND as DNS service

## <a name="v1-0-0"></a> [1.0.0](/~https://github.com/bloodhunterd/froxlor-docker/releases/tag/1.0.0) - 11.08.2020

* Unneeded NSCD removed to increase performance
Expand Down
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ FROM debian:stable-slim

# MariaDB
ARG MARIADB_VERSION=10.5

# PHP
ENV PHP_VERSION_1=7.2
ENV PHP_VERSION_2=7.3
ENV PHP_VERSION_3=7.4

# Timezone
ENV TZ=Europe/Berlin

# NGINX
EXPOSE 80
EXPOSE 443

# BIND
EXPOSE 53

# Update and upgrade package repositories
RUN apt-get update && \
apt-get upgrade -y --no-install-recommends
Expand Down Expand Up @@ -51,9 +56,10 @@ RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
# Update package repositories
RUN apt-get update

# Install NGINX, MariaDB, AwStats, Cron and Let's Encrypt
# Install NGINX, MariaDB, BIND, AwStats, Cron and Let's Encrypt
RUN apt-get install -y --no-install-recommends \
awstats \
bind9 \
cron \
letsencrypt \
libnss-extrausers \
Expand Down Expand Up @@ -125,6 +131,12 @@ RUN mkdir -p /var/lib/extrausers && \
touch /var/lib/extrausers/group && \
touch /var/lib/extrausers/shadow

# Configure BIND
RUN echo "include \"/etc/bind/froxlor_bind.conf\";" >> /etc/bind/named.conf.local && \
touch /etc/bind/froxlor_bind.conf && \
chown bind:0 /etc/bind/froxlor_bind.conf && \
chmod 0644 /etc/bind/froxlor_bind.conf

# Create Froxlor user and group
RUN addgroup --gid 9999 froxlorlocal && \
adduser --no-create-home --uid 9999 --ingroup froxlorlocal --shell /bin/false --disabled-password --gecos '' froxlorlocal && \
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
[![Release](https://img.shields.io/github/v/release/bloodhunterd/froxlor-docker?include_prereleases&style=for-the-badge)](/~https://github.com/bloodhunterd/froxlor-docker/releases)
[![Docker Build](https://img.shields.io/docker/cloud/build/bloodhunterd/froxlor?style=for-the-badge)](https://hub.docker.com/r/bloodhunterd/froxlor)
[![Docker Pulls](https://img.shields.io/docker/pulls/bloodhunterd/froxlor?style=for-the-badge)](https://hub.docker.com/r/bloodhunterd/froxlor)
[![Docker Stars](https://img.shields.io/docker/stars/bloodhunterd/froxlor?style=for-the-badge)](https://hub.docker.com/r/bloodhunterd/froxlor)
[![License](https://img.shields.io/github/license/bloodhunterd/froxlor-docker?style=for-the-badge)](/~https://github.com/bloodhunterd/froxlor-docker/blob/master/LICENSE)

[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/P5P51U5SZ)

# Froxlor Docker

Docker Image for Froxlor Server Management Panel.
Docker image for Froxlor Server Management Panel.

## Installation

[Froxlor](https://froxlor.org/) must be downloaded separately and mounted into the container, since it must be setup individually.
Download [Froxlor](https://froxlor.org/) and mount it into the container due individually setup.

## Configuration

Expand Down Expand Up @@ -58,6 +62,7 @@ docker-compose up -d
* [NGINX](https://www.nginx.com/)
* [MariaDB](https://mariadb.org/)
* [PHP](https://www.php.net/)
* [BIND](https://www.isc.org/bind/)
* [Let's Encrypt](https://letsencrypt.org/)
* [Debian](https://www.debian.org/)
* [Docker](https://www.docker.com/)
Expand Down
19 changes: 15 additions & 4 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,27 @@ echo "${TZ}" > /etc/timezone

service cron start

service php${PHP_VERSION_1}-fpm start
service php${PHP_VERSION_2}-fpm start
service php${PHP_VERSION_3}-fpm start
# Start DNS service
service bind9 start

# Start webserver service
service nginx start

sleep 10
# Start PHP services
service php${PHP_VERSION_1}-fpm start
service php${PHP_VERSION_2}-fpm start
service php${PHP_VERSION_3}-fpm start

# Run Froxlor Cron
/usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --force

# Take some time to breath
sleep 5

# Start PHP services again, if they failed on the first time
service php${PHP_VERSION_1}-fpm start
service php${PHP_VERSION_2}-fpm start
service php${PHP_VERSION_3}-fpm start

# Show log
tail -f /var/log/nginx/error.log

0 comments on commit 668ac34

Please sign in to comment.