Initial commit
This commit is contained in:
commit
ae01418637
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "html/html-wojciechkozlowski.eu"]
|
||||
path = html/html-wojciechkozlowski.eu
|
||||
url = git@github.com:Wojtek242/html-wojciechkozlowski.eu.git
|
40
dokuwiki/Dockerfile
Normal file
40
dokuwiki/Dockerfile
Normal file
@ -0,0 +1,40 @@
|
||||
FROM debian
|
||||
|
||||
ENV HTML_PATH /usr/share/nginx/html
|
||||
ENV DOKU_VOL /var/dokuwiki-storage
|
||||
|
||||
RUN apt update && apt install -y wget php7.0-fpm php7.0-xml nginx
|
||||
RUN sed -i -e "s|cgi.fix_pathinfo=1|cgi.fix_pathinfo=0|g" /etc/php/7.0/fpm/php.ini
|
||||
|
||||
RUN rm -rf /etc/nginx/sites-enabled/*
|
||||
RUN rm -rf /etc/nginx/conf.d
|
||||
ADD nginx-conf.d /etc/nginx/conf.d
|
||||
|
||||
RUN rm -rf $HTML_PATH && \
|
||||
mkdir $HTML_PATH && \
|
||||
mkdir $DOKU_VOL && \
|
||||
mkdir $DOKU_VOL/data && \
|
||||
cd $HTML_PATH && \
|
||||
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz && \
|
||||
tar xf dokuwiki-stable.tgz --strip 1 && \
|
||||
rm dokuwiki-stable.tgz && \
|
||||
chown -R www-data:www-data ./ && \
|
||||
mv $HTML_PATH/data/pages $DOKU_VOL/data/pages && \
|
||||
ln -s $DOKU_VOL/data/pages $HTML_PATH/data/pages && \
|
||||
mv $HTML_PATH/data/meta $DOKU_VOL/data/meta && \
|
||||
ln -s $DOKU_VOL/data/meta $HTML_PATH/data/meta && \
|
||||
mv $HTML_PATH/data/media $DOKU_VOL/data/media && \
|
||||
ln -s $DOKU_VOL/data/media $HTML_PATH/data/media && \
|
||||
mv $HTML_PATH/data/media_attic $DOKU_VOL/data/media_attic && \
|
||||
ln -s $DOKU_VOL/data/media_attic $HTML_PATH/data/media_attic && \
|
||||
mv $HTML_PATH/data/media_meta $DOKU_VOL/data/media_meta && \
|
||||
ln -s $DOKU_VOL/data/media_meta $HTML_PATH/data/media_meta && \
|
||||
mv $HTML_PATH/data/attic $DOKU_VOL/data/attic && \
|
||||
ln -s $DOKU_VOL/data/attic $HTML_PATH/data/attic && \
|
||||
mv $HTML_PATH/conf $DOKU_VOL/conf && \
|
||||
ln -s $DOKU_VOL/conf $HTML_PATH/conf
|
||||
|
||||
EXPOSE 80
|
||||
VOLUME ["$DOKU_VOL"]
|
||||
|
||||
CMD service php7.0-fpm start && nginx -g "daemon off;"
|
31
dokuwiki/nginx-conf.d/default.conf
Normal file
31
dokuwiki/nginx-conf.d/default.conf
Normal file
@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
index doku.php;
|
||||
try_files $uri $uri/ @dokuwiki;
|
||||
}
|
||||
|
||||
location @dokuwiki {
|
||||
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
|
||||
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
|
||||
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
|
||||
rewrite ^/(.*) /doku.php?id=$1 last;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /(data|conf|bin|inc)/ {
|
||||
deny all;
|
||||
}
|
||||
}
|
3
html/Dockerfile
Normal file
3
html/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM nginx
|
||||
|
||||
ADD html-wojciechkozlowski.eu /usr/share/nginx/html
|
1
html/html-wojciechkozlowski.eu
Submodule
1
html/html-wojciechkozlowski.eu
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a667b7c557471d1c373e4e7e41542783ccf736d9
|
4
nginx-proxy/Dockerfile
Normal file
4
nginx-proxy/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
||||
FROM nginx
|
||||
|
||||
RUN rm -rf /etc/nginx/conf.d
|
||||
ADD nginx-conf.d /etc/nginx/conf.d
|
17
nginx-proxy/nginx-conf.d/wiki.wojciechkozlowski.eu.conf
Normal file
17
nginx-proxy/nginx-conf.d/wiki.wojciechkozlowski.eu.conf
Normal file
@ -0,0 +1,17 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name wiki.wojciechkozlowski.eu;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://docker_wiki;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
}
|
17
nginx-proxy/nginx-conf.d/wojciechkozlowski.eu.conf
Normal file
17
nginx-proxy/nginx-conf.d/wojciechkozlowski.eu.conf
Normal file
@ -0,0 +1,17 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name wojciechkozlowski.eu;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://docker_html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user