commit c128fd503227a0111d6bf0f59214e90db8542cb0 Author: magmaus3 Date: Fri Apr 14 10:35:51 2023 +0200 init diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..87a57c6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# FROM php:apache +FROM php:8.1.17-apache + +RUN apt update && apt install -y git +RUN git clone --depth 1 --branch master https://github.com/cvolton/gmdprivateserver /gdps +COPY config/ /gdps/config +RUN apt purge -y git && apt autoremove -y +RUN chmod a+r /gdps +RUN rm -rf /var/www/html +RUN ln -s /gdps/* /var/www/html + +RUN mkdir -p /etc/apache2/conf-enabled +COPY apache-config.conf /etc/apache2/conf-enabled/docker-php.conf +COPY apache-site.conf /etc/apache2/sites-enabled/gdps.conf + +WORKDIR /gdps +# ENTRYPOINT /bin/bash diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b9e7a5 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# `github.com/Cvolton/GMDprivateServer`, packaged in docker + +## Usage: + +building: +``` +docker buildx build . -t +``` + +running (remove the `-it` params to run in background): +``` +docker run -p 8080:80 --rm -it +``` diff --git a/TODO b/TODO new file mode 100644 index 0000000..66dc4f1 --- /dev/null +++ b/TODO @@ -0,0 +1,3 @@ +- Patch the server for environment-based settings +- Add a server to the image +- test the image diff --git a/apache-config.conf b/apache-config.conf new file mode 100644 index 0000000..7f4bec6 --- /dev/null +++ b/apache-config.conf @@ -0,0 +1,11 @@ + + SetHandler application/x-httpd-php + + +DirectoryIndex enabled +DirectoryIndex index.php index.html + + + Options -Indexes + AllowOverride All + diff --git a/apache-site.conf b/apache-site.conf new file mode 100644 index 0000000..d39222f --- /dev/null +++ b/apache-site.conf @@ -0,0 +1,42 @@ + + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + #ServerName www.example.com + + #ServerAdmin webmaster@localhost + DocumentRoot /gdps + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + + SetHandler application/x-httpd-php + + + DirectoryIndex enabled + DirectoryIndex index.php index.html + + + Options -Indexes + AllowOverride All + + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/config/README b/config/README new file mode 100644 index 0000000..85f6659 --- /dev/null +++ b/config/README @@ -0,0 +1 @@ +Taken from the server, might rewrite it soon. diff --git a/config/connection.php b/config/connection.php new file mode 100644 index 0000000..0c21fc7 --- /dev/null +++ b/config/connection.php @@ -0,0 +1,13 @@ + diff --git a/config/dailyChests.php b/config/dailyChests.php new file mode 100644 index 0000000..d696a50 --- /dev/null +++ b/config/dailyChests.php @@ -0,0 +1,28 @@ + diff --git a/config/discord.php b/config/discord.php new file mode 100644 index 0000000..ba141f7 --- /dev/null +++ b/config/discord.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/config/reuploadAcc.php b/config/reuploadAcc.php new file mode 100644 index 0000000..3b6d0a6 --- /dev/null +++ b/config/reuploadAcc.php @@ -0,0 +1,12 @@ + diff --git a/config/security.php b/config/security.php new file mode 100644 index 0000000..c366af8 --- /dev/null +++ b/config/security.php @@ -0,0 +1,13 @@ +