init
This commit is contained in:
commit
c128fd5032
12 changed files with 166 additions and 0 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal file
|
@ -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
|
13
README.md
Normal file
13
README.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# `github.com/Cvolton/GMDprivateServer`, packaged in docker
|
||||||
|
|
||||||
|
## Usage:
|
||||||
|
|
||||||
|
building:
|
||||||
|
```
|
||||||
|
docker buildx build . -t <image tag>
|
||||||
|
```
|
||||||
|
|
||||||
|
running (remove the `-it` params to run in background):
|
||||||
|
```
|
||||||
|
docker run -p 8080:80 --rm -it <the tag you chose earlier>
|
||||||
|
```
|
3
TODO
Normal file
3
TODO
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
- Patch the server for environment-based settings
|
||||||
|
- Add a server to the image
|
||||||
|
- test the image
|
11
apache-config.conf
Normal file
11
apache-config.conf
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<FilesMatch \.php$>
|
||||||
|
SetHandler application/x-httpd-php
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
DirectoryIndex enabled
|
||||||
|
DirectoryIndex index.php index.html
|
||||||
|
|
||||||
|
<Directory /gdps>
|
||||||
|
Options -Indexes
|
||||||
|
AllowOverride All
|
||||||
|
</Directory>
|
42
apache-site.conf
Normal file
42
apache-site.conf
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<VirtualHost *:80>
|
||||||
|
# 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
|
||||||
|
<FilesMatch \.php$>
|
||||||
|
SetHandler application/x-httpd-php
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
DirectoryIndex enabled
|
||||||
|
DirectoryIndex index.php index.html
|
||||||
|
|
||||||
|
<Directory /gdps>
|
||||||
|
Options -Indexes
|
||||||
|
AllowOverride All
|
||||||
|
</Directory>
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
1
config/README
Normal file
1
config/README
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Taken from the server, might rewrite it soon.
|
13
config/connection.php
Normal file
13
config/connection.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
$servername = $_ENV['DB_SERVER_NAME'];
|
||||||
|
$port = (int)$_ENV['DB_PORT'];
|
||||||
|
$username = $_ENV['DB_USERNAME'];
|
||||||
|
$password = $_ENV['DB_PASSWORD'];
|
||||||
|
$dbname = $_ENV['DB_DATABASE_NAME'];
|
||||||
|
|
||||||
|
// $servername = "127.0.0.1";
|
||||||
|
// $port = 3306;
|
||||||
|
// $username = "root";
|
||||||
|
// $password = "";
|
||||||
|
// $dbname = "geometrydash";
|
||||||
|
?>
|
28
config/dailyChests.php
Normal file
28
config/dailyChests.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
QUESTS
|
||||||
|
*/
|
||||||
|
//NOW SET IN THE QUESTS TABLE IN THE MYSQL DATABASE
|
||||||
|
/*
|
||||||
|
REWARDS
|
||||||
|
*/
|
||||||
|
//SMALL CHEST
|
||||||
|
$chest1minOrbs = 200;
|
||||||
|
$chest1maxOrbs = 400;
|
||||||
|
$chest1minDiamonds = 2;
|
||||||
|
$chest1maxDiamonds = 10;
|
||||||
|
$chest1items = [1, 2, 3, 4, 5, 6];
|
||||||
|
$chest1minKeys = 1;
|
||||||
|
$chest1maxKeys = 6;
|
||||||
|
//BIG CHEST
|
||||||
|
$chest2minOrbs = 2000;
|
||||||
|
$chest2maxOrbs = 4000;
|
||||||
|
$chest2minDiamonds = 20;
|
||||||
|
$chest2maxDiamonds = 100;
|
||||||
|
$chest2items = [1, 2, 3, 4, 5, 6];
|
||||||
|
$chest2minKeys = 1;
|
||||||
|
$chest2maxKeys = 6;
|
||||||
|
//REWARD TIMES (in seconds)
|
||||||
|
$chest1wait = 3600;
|
||||||
|
$chest2wait = 14400;
|
||||||
|
?>
|
5
config/discord.php
Normal file
5
config/discord.php
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
$discordEnabled = false;
|
||||||
|
$secret = "please change this if you intend to use a discord bot with the server";
|
||||||
|
$bottoken = "please change this to a discord bot token if you use one";
|
||||||
|
?>
|
12
config/reuploadAcc.php
Normal file
12
config/reuploadAcc.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
$reupUID = 71; // The UserID of the account.
|
||||||
|
$reupAID = 71; // The AccountID of the account. Also known as extID in the "users" table.
|
||||||
|
|
||||||
|
/*
|
||||||
|
Setup for the reupload account:
|
||||||
|
Create a new account on the GDPS and edit the UserID and AccountID accordingly
|
||||||
|
in the users table.
|
||||||
|
|
||||||
|
Image example of getting the IDs can be found here: https://i.imgur.com/9Nkb9WK.png
|
||||||
|
*/
|
||||||
|
?>
|
13
config/security.php
Normal file
13
config/security.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
$sessionGrants = true; //false = GJP check is done every time; true = GJP check is done once per hour; significantly improves performance, slightly descreases security
|
||||||
|
$unregisteredSubmissions = false; //false = green accounts can't upload levels, appear on the leaderboards etc; true = green accounts can do everything
|
||||||
|
$preactivateAccounts = true; //false = acounts need to be activated at tools/account/activateAccount.php; true = accounts can log in immediately
|
||||||
|
|
||||||
|
/*
|
||||||
|
Captcha settings
|
||||||
|
Currently the only supported provider is hCaptcha
|
||||||
|
https://www.hcaptcha.com/
|
||||||
|
*/
|
||||||
|
$enableCaptcha = false;
|
||||||
|
$hCaptchaKey = "";
|
||||||
|
$hCaptchaSecret = "";
|
8
config/topArtists.php
Normal file
8
config/topArtists.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
$redirect = 0;
|
||||||
|
/*
|
||||||
|
Indicates wether the server should ask the main GD servers for the top artists list or not.
|
||||||
|
If it's 0, it will fetch the most commonly used songs on the server by artists and list such up.
|
||||||
|
If it's 1, it will ask the main servers for the list (which is not actively maintained).
|
||||||
|
*/
|
||||||
|
?>
|
Loading…
Reference in a new issue