]> git.aero2k.de Git - dfde-docker.git/commitdiff
users:
authorThorsten S <mail@aero2k.de>
Sat, 8 Jul 2017 14:09:58 +0000 (16:09 +0200)
committerThorsten S <mail@aero2k.de>
Sat, 8 Jul 2017 14:29:25 +0000 (16:29 +0200)
kekskopf:kekskopf
user_1:user_1

user_100..150

helferscript:

bash ctrl.sh start/stop/restart/safedb/commit

theme muss parallel dazu in ../dfde-theme liegen, siehe docker/run.sh.
Im ctrl.sh script steht außerdem mein username drin für den db-extract.
bitte anpassen, wers braucht.

Kann aber auch jeder selbst so machen wie er lustig ist.

.gitignore [new file with mode: 0644]
ctrl.sh [new file with mode: 0755]
docker/Dockerfile [new file with mode: 0644]
docker/config.php [new file with mode: 0644]
docker/db [new file with mode: 0755]
docker/phpBB-3.2.0.zip [new file with mode: 0644]
docker/run.sh [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..1377554
--- /dev/null
@@ -0,0 +1 @@
+*.swp
diff --git a/ctrl.sh b/ctrl.sh
new file mode 100755 (executable)
index 0000000..1bee1ac
--- /dev/null
+++ b/ctrl.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+cmd=$1
+pushd docker
+
+case $cmd in
+stop)
+       docker ps -q | xargs docker stop -t1
+       ;;
+start)
+       bash run.sh &
+       ;;
+restart)
+       bash $0 stop && bash $0 start
+       ;;
+safedb)
+       docker ps -q | xargs -I_ docker cp _:/tmp/db db
+       chown thorsten:thorsten db
+       ;;
+commit)
+       docker ps -q | xargs -I_ docker commit _
+       ;;
+esac
+
+popd
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644 (file)
index 0000000..18c9c22
--- /dev/null
@@ -0,0 +1,19 @@
+FROM php:5.6-apache
+
+MAINTAINER nobody
+
+RUN apt-get update
+RUN apt-get install -y zip
+COPY phpBB-3.2.0.zip /tmp/
+
+RUN unzip /tmp/phpBB-3.2.0.zip -d /var/www/html/
+
+COPY db /tmp/db
+COPY config.php /var/www/html/phpBB3/
+
+RUN find /var/www/html/phpBB3 -ls >> /var/www/html/sitemap.txt
+RUN chown www-data:www-data -R /var/www/html/phpBB3
+RUN chown www-data:www-data /tmp/db
+
+RUN rm -rf /var/www/html/phpBB3/install
+
diff --git a/docker/config.php b/docker/config.php
new file mode 100644 (file)
index 0000000..bb5bb13
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+// phpBB 3.2.x auto-generated configuration file
+// Do not change anything in this file!
+$dbms = 'phpbb\\db\\driver\\sqlite3';
+$dbhost = '/tmp/db';
+$dbport = '';
+$dbname = 'phpbb';
+$dbuser = 'kekskopf';
+$dbpasswd = 'kekskopf';
+$table_prefix = 'phpbb_';
+$phpbb_adm_relative_path = 'adm/';
+$acm_type = 'phpbb\\cache\\driver\\file';
+
+@define('PHPBB_INSTALLED', true);
+// @define('PHPBB_DISPLAY_LOAD_TIME', true);
+@define('PHPBB_ENVIRONMENT', 'production');
+// @define('DEBUG_CONTAINER', true);
+
+
diff --git a/docker/db b/docker/db
new file mode 100755 (executable)
index 0000000..49804ce
Binary files /dev/null and b/docker/db differ
diff --git a/docker/phpBB-3.2.0.zip b/docker/phpBB-3.2.0.zip
new file mode 100644 (file)
index 0000000..02fea18
Binary files /dev/null and b/docker/phpBB-3.2.0.zip differ
diff --git a/docker/run.sh b/docker/run.sh
new file mode 100644 (file)
index 0000000..c813f95
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash -e
+docker build -t dfde .
+docker run -p 8080:80 -v $PWD/../../dfde-theme/:/var/www/html/phpBB3/styles/dfde dfde