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

Commit

Permalink
RELEASE #php #nginx #mariadb #debian #goaccess #cron #release Release…
Browse files Browse the repository at this point in the history
… 4.0.0

Fix cron execution for Froxlor version 2.0.0 and above.
Add GoAccess version 1.4.
Update PHP versions to 8.0.28, 8.1.18 and 8.2.6.
Update NGINX version to 1.25.0.
Update MariaDB version to 10.11.3.
Update Debian version to 11.7.
  • Loading branch information
bloodhunterd committed May 25, 2023
1 parent 1ab5bbf commit 5f21b87
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 66 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes will be documented in this file.

<a name="v4-0-0"></a>
## [4.0.0](https://github.com/bloodhunterd/froxlor/releases/tag/4.0.0) &#9839; 25.05.2023

* Fix cron execution for Froxlor version **2.0.0** and above
* Add **GoAccess** version **1.4**
* Update **PHP** versions to **8.0.28**, **8.1.18** and **8.2.6**
* Update **NGINX** version to **1.25.0**
* Update **MariaDB** version to **10.11.3**
* Update **Debian** version to **11.7**

## :warning: Previous versions are only compatible with Froxlor 0.10.x

<a name="v3-3-2"></a>
## [3.3.2](https://github.com/bloodhunterd/froxlor/releases/tag/3.3.2) &#9839; 13.01.2023

Expand Down
40 changes: 23 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM debian:stable-slim
ARG DEBIAN_VERSION=11.7

FROM debian:${DEBIAN_VERSION}-slim

# ======================================================================================================================
# Package versions
# ======================================================================================================================

# MariaDB
ARG MARIADB_VERSION=10.10
ARG MARIADB_VERSION=10.11

# NGINX
ARG NGINX_VERSION=1.23.*
ARG NGINX_VERSION=1.25.*

# PHP
ENV PHP_VERSION_1=7.4
Expand Down Expand Up @@ -85,6 +87,8 @@ RUN apt-get install -y --no-install-recommends \
awstats \
bind9 \
cron \
goaccess \
jq \
letsencrypt \
libnss-extrausers \
mariadb-client \
Expand Down Expand Up @@ -180,10 +184,10 @@ RUN cp /usr/share/awstats/tools/awstats_buildstaticpages.pl /usr/bin/ && \
# Lib extrausers
# ======================================================================================================================

RUN mkdir -p /var/lib/extrausers && \
touch /var/lib/extrausers/passwd && \
touch /var/lib/extrausers/group && \
touch /var/lib/extrausers/shadow
RUN mkdir -p /var/lib/extrausers && touch \
/var/lib/extrausers/passwd \
/var/lib/extrausers/group \
/var/lib/extrausers/shadow

# ======================================================================================================================
# BIND DNS
Expand All @@ -203,19 +207,21 @@ RUN groupadd -f froxlorlocal && \
adduser www-data froxlorlocal

# ======================================================================================================================
# Froxlor directories
# Filesystem
# ======================================================================================================================

RUN mkdir -p /var/www && \
mkdir -p /var/customers/logs && \
mkdir -p /var/customers/mail && \
mkdir -p /var/customers/webs && \
mkdir -p /var/customers/tmp && \
mkdir -p /etc/ssl/froxlor
RUN mkdir -p \
/etc/ssl/froxlor \
# /opt/froxlor \
/var/customers/logs \
/var/customers/mail \
/var/customers/webs \
/var/customers/tmp \
/var/www/froxlor

# ======================================================================================================================
# Filesystem
# ======================================================================================================================
#RUN wget -O /opt/froxlor/froxlor-latest.tar.gz https://files.froxlor.org/releases/froxlor-latest.tar.gz && \
# tar xvfz /opt/froxlor/froxlor-latest.tar.gz && \
# rm /opt/froxlor/froxlor-latest.tar.gz

COPY ./src/ /

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright 2021 BloodhunterD
Copyright 2023 BloodhunterD

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Docker image for Froxlor Server Management Panel.
* [PHP](https://www.php.net/) 7.4, 8.0, 8.1 and 8.2 support
* [BIND](https://www.isc.org/bind/) DNS support
* [Let's Encrypt](https://letsencrypt.org/) SSL certificate support
* [GoAccess](https://goaccess.io/) web log analyzer support

## Deployment

Expand All @@ -39,8 +40,8 @@ services:
- ./customers/logs/:/var/customers/logs/
- ./customers/mail/:/var/customers/mail/
- ./customers/webs:/var/customers/webs/
- ./.acme.sh/:/root/.acme.sh/
- ./ssl/:/etc/ssl/froxlor/
- ./.acme.sh/:/root/.acme.sh/
~~~

### Configuration
Expand Down Expand Up @@ -79,14 +80,16 @@ docker-compose up -d

## Build With

* [Froxlor](https://froxlor.org/)
* [NGINX](https://www.nginx.com/)
* [MariaDB](https://mariadb.org/)
* [PHP](https://www.php.net/)
* [AWStats](https://awstats.sourceforge.io/)
* [BIND](https://www.isc.org/bind/)
* [Let's Encrypt](https://letsencrypt.org/)
* [Debian](https://www.debian.org/)
* [Docker](https://www.docker.com/)
* [Froxlor](https://froxlor.org/)
* [GoAccess](https://goaccess.io/)
* [Let's Encrypt](https://letsencrypt.org/)
* [MariaDB](https://mariadb.org/)
* [NGINX](https://www.nginx.com/)
* [PHP](https://www.php.net/)

## Authors

Expand Down
15 changes: 7 additions & 8 deletions src/etc/cron.d/froxlor
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#
*/5 * * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --tasks 1> /dev/null
0 0 * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --traffic 1> /dev/null
5 0 * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --used_tickets_reset 1> /dev/null
7 0 1 * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --ticketarchive 1> /dev/null
10 0 * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --usage_report 1> /dev/null
0 */6 * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --mailboxsize 1> /dev/null
*/5 * * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --letsencrypt 1> /dev/null
15 0 * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --backup 1> /dev/null
*/5 * * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/bin/froxlor-cli froxlor:cron 'tasks' -q 1> /dev/null
0 0 * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/bin/froxlor-cli froxlor:cron 'traffic' -q 1> /dev/null
5 0 * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/bin/froxlor-cli froxlor:cron 'usage_report' -q 1> /dev/null
0 */6 * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/bin/froxlor-cli froxlor:cron 'mailboxsize' -q 1> /dev/null
*/5 * * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/bin/froxlor-cli froxlor:cron 'letsencrypt' -q 1> /dev/null
# Look for and purge old sessions every 30 minutes
09,39 * * * * root /usr/bin/nice -n 5 /usr/bin/php -q /var/www/froxlor/bin/froxlor-cli froxlor:php-sessionclean 1> /dev/null
2 changes: 1 addition & 1 deletion src/etc/nginx/acme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ location /.well-known/acme-challenge {
location ~ /.well-known/acme-challenge/(.*) {
default_type text/plain;
}
}
}
2 changes: 1 addition & 1 deletion src/etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ server {

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_index index.php;

include fastcgi_params;
Expand Down
2 changes: 1 addition & 1 deletion src/etc/nginx/fastcgi_params
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
fastcgi_param REDIRECT_STATUS 200;
2 changes: 1 addition & 1 deletion src/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ http {
# protocol imap;
# proxy on;
# }
#}
#}
28 changes: 14 additions & 14 deletions src/etc/nsswitch.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
passwd: compat extrausers
group: compat extrausers
shadow: compat extrausers
passwd: compat extrausers
group: compat extrausers
shadow: compat extrausers

hosts: files dns
networks: files dns
hosts: files dns
networks: files dns

services: db files
protocols: db files
rpc: db files
ethers: db files
netmasks: files
netgroup: files
bootparams: files
services: db files
protocols: db files
rpc: db files
ethers: db files
netmasks: files
netgroup: files
bootparams: files

automount: files
aliases: files
automount: files
aliases: files
29 changes: 13 additions & 16 deletions src/start.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
#!/bin/bash

########################################################################################################################
# ======================================================================================================================
# Timezone
########################################################################################################################
# ======================================================================================================================

ln -snf "/usr/share/zoneinfo/${TZ}" etc/localtime && \
echo "${TZ}" > /etc/timezone
ln -fns "/usr/share/zoneinfo/${TZ}" etc/localtime && echo "${TZ}" > /etc/timezone

# ======================================================================================================================
# Froxlor PHP-FPM
# Froxlor
# ======================================================================================================================

# PHP-FPM
chown -R www-data:www-data /var/www/froxlor
php /var/www/froxlor/bin/froxlor-cli froxlor:cron -f
php /var/www/froxlor/bin/froxlor-cli froxlor:cron --force

########################################################################################################################
# Froxlor Cron
########################################################################################################################
# Cron
ln -fns /var/www/froxlor/bin/froxlor-cli /usr/local/bin/froxlor-cli
php /var/www/froxlor/bin/froxlor-cli froxlor:cron --run-task 99

ln -s /var/www/froxlor/bin/froxlor-cli /usr/local/bin/froxlor-cli
php /var/www/froxlor/bin/froxlor-cli froxlor:cron -r 99 # re-create cron.d-file

########################################################################################################################
# ======================================================================================================================
# Services
########################################################################################################################
# ======================================================================================================================

cron
named
Expand All @@ -34,8 +31,8 @@ service php${PHP_VERSION_2}-fpm start
service php${PHP_VERSION_3}-fpm start
service php${PHP_VERSION_4}-fpm start

########################################################################################################################
# ======================================================================================================================
# Logging
########################################################################################################################
# ======================================================================================================================

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

0 comments on commit 5f21b87

Please sign in to comment.