https://github.com/Gargaj/wuhu
- Docker
- Docker Compose
- Download / clone these files and add them to your Wuhu root dir
- Apply config.php.patch:
git apply config.php.patch
- Run
./init.sh
- Copy
php.ini
to./config
- Run
docker-compose up
https://github.com/Gargaj/wuhu
git apply config.php.patch
./init.sh
php.ini
to ./config
docker-compose up
diff --git a/www_admin/config.php b/www_admin/config.php | |
index 3415187..1b634a8 100644 | |
--- a/www_admin/config.php | |
+++ b/www_admin/config.php | |
@@ -140,7 +140,7 @@ function perform(&$msg) { | |
// end of checks | |
- SQLLib::$link = mysqli_connect("localhost",$_POST["mysql_username"],$_POST["mysql_password"],$_POST["mysql_database"]); | |
+ SQLLib::$link = mysqli_connect("mysql",$_POST["mysql_username"],$_POST["mysql_password"],$_POST["mysql_database"]); | |
if (mysqli_connect_errno(SQLLib::$link)) | |
{ | |
$msg = "Unable to connect to MySQL: ".mysqli_connect_error(); | |
@@ -202,7 +202,7 @@ function perform(&$msg) { | |
for($x=0;$x<64;$x++) $salt.=chr(rand(0x30,0x7a)); | |
$db = | |
"<"."?\n". | |
- "define('SQL_HOST','localhost');\n". | |
+ "define('SQL_HOST','mysql');\n". | |
"define('SQL_USERNAME',\"".addslashes($_POST["mysql_username"])."\");\n". | |
"define('SQL_PASSWORD',\"".addslashes($_POST["mysql_password"])."\");\n". | |
"define('SQL_DATABASE',\"".addslashes($_POST["mysql_database"])."\");\n". | |
@@ -217,7 +217,6 @@ function perform(&$msg) { | |
if ($_POST["admin_username"] && $_POST["admin_password"] ) { | |
$htaccess = | |
"AuthUserFile ".dirname($_SERVER["SCRIPT_FILENAME"])."/.htpasswd\n". | |
- "AuthGroupFile /dev/null\n". | |
"AuthName 'Wuhu Virtual Organizer Area - Enter password to continue'\n". | |
"AuthType Basic\n". | |
"\n". |
version: '2' | |
services: | |
php: | |
build: . | |
image: wuhu:latest | |
expose: | |
- 9000 | |
volumes: | |
- ./www_admin:/var/www/admin | |
- ./www_party:/var/www/party | |
- ./entries_private:/var/www/entries_private | |
- ./entries_public:/var/www/entries_public | |
- ./screenshots:/var/www/screenshots | |
admin: | |
image: webdevops/apache:latest | |
environment: | |
WEB_DOCUMENT_ROOT: /var/www/admin | |
WEB_ALIAS_DOMAIN: www.admin | |
WEB_PHP_SOCKET: php:9000 | |
volumes: | |
- ./www_admin:/var/www/admin | |
- ./www_party:/var/www/party | |
- ./entries_private:/var/www/entries_private | |
- ./entries_public:/var/www/entries_public | |
- ./screenshots:/var/www/screenshots | |
ports: | |
- 8081:80 | |
links: | |
- php | |
party: | |
image: webdevops/apache:latest | |
environment: | |
WEB_DOCUMENT_ROOT: /var/www/party | |
WEB_ALIAS_DOMAIN: www.party | |
WEB_PHP_SOCKET: php:9000 | |
volumes: | |
- ./www_admin:/var/www/admin | |
- ./www_party:/var/www/party | |
- ./entries_private:/var/www/entries_private | |
- ./entries_public:/var/www/entries_public | |
- ./screenshots:/var/www/screenshots | |
ports: | |
- 8080:80 | |
links: | |
- php | |
mysql: | |
image: mariadb:latest | |
environment: | |
MYSQL_RANDOM_ROOT_PASSWORD: 'yes' | |
MYSQL_DATABASE: wuhu | |
MYSQL_USER: wuhu | |
MYSQL_PASSWORD: wuhu | |
volumes: | |
- ./database:/var/lib/mysql | |
expose: | |
- 3306 |
FROM php:5.6-fpm | |
RUN apt-get update && apt-get install -y \ | |
libfreetype6-dev \ | |
libjpeg62-turbo-dev \ | |
libmcrypt-dev \ | |
libpng12-dev \ | |
&& docker-php-ext-install -j$(nproc) iconv mcrypt mysql mysqli \ | |
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
&& docker-php-ext-install -j$(nproc) gd | |
COPY config/php.ini /usr/local/etc/php/ |
#!/usr/bin/env bash | |
mkdir -p ./config | |
mkdir -p ./entries_private | |
mkdir -p ./entries_public | |
mkdir -p ./screenshots | |
chmod -R g+rw . | |
chmod -R a+rw . |
# should be in config/php.ini | |
upload_max_filesize = 128M | |
post_max_size = 256M | |
memory_limit = 512M | |
session.gc_maxlifetime = 604800 | |
short_open_tag = On | |
date.timezone = Europe/Helsinki |