mirror of
https://git.sindominio.net/estibadores/wordpress.git
synced 2024-11-10 05:11:07 +01:00
First commit. Test version
This commit is contained in:
commit
aa8045a55d
36
docker-compose.yml
Normal file
36
docker-compose.yml
Normal file
@ -0,0 +1,36 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
nginx:
|
||||
build: "./nginx/"
|
||||
container_name: sd_wp_nginx
|
||||
restart: always
|
||||
links:
|
||||
- php-fpm:wp
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- sd-wp-data:/var/www/html
|
||||
|
||||
php-fpm:
|
||||
build: "./php-fpm/"
|
||||
container_name: sd_wp_php
|
||||
restart: always
|
||||
links:
|
||||
- mariadb:db
|
||||
depends_on:
|
||||
- mariadb
|
||||
volumes:
|
||||
- sd-wp-data:/sindominio/wordpress
|
||||
|
||||
mariadb:
|
||||
build: "./mariadb/"
|
||||
container_name: sd_wp_db
|
||||
restart: always
|
||||
volumes:
|
||||
- sd-wp-db:/var/lib/mysql
|
||||
volumes:
|
||||
sd-wp-data:
|
||||
sd-wp-db:
|
10
mariadb/Dockerfile
Normal file
10
mariadb/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM registry.sindominio.net/debian
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -qy install mariadb-server &&\
|
||||
apt-get clean
|
||||
|
||||
VOLUME /var/lib/mysql
|
||||
|
||||
CMD ["/usr/bin/mysqld_safe"]]
|
||||
|
16
nginx/Dockerfile
Normal file
16
nginx/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM registry.sindominio.net/debian
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -qy install nginx-full &&\
|
||||
apt-get clean
|
||||
|
||||
COPY sd.conf /etc/nginx/sites-available/sd.conf
|
||||
RUN rm /etc/nginx/sites-enabled/default
|
||||
RUN ln -s /etc/nginx/sites-available/sd.conf /etc/nginx/sites-enabled/sd.conf
|
||||
|
||||
VOLUME /var/www/html
|
||||
|
||||
EXPOSE 443
|
||||
EXPOSE 80
|
||||
|
||||
CMD /usr/sbin/nginx -g "daemon off; master_process off;"
|
80
nginx/sd.conf
Normal file
80
nginx/sd.conf
Normal file
@ -0,0 +1,80 @@
|
||||
# WordPress multisite subdirectory rules.
|
||||
|
||||
map $uri $blogname{
|
||||
~^(?P<blogpath>/[^/]+/)files/(.*) $blogpath ;
|
||||
}
|
||||
|
||||
map $blogname $blogid{
|
||||
default -999;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 23080;
|
||||
listen [::]:23080;
|
||||
|
||||
server_name _default_;
|
||||
server_name wp.sindominio.net;
|
||||
server_name yyvaclqpmkx22jraecxtv5bt5ukqkjmygvhw2wk3ee5zl7jkavhs7rid.onion;
|
||||
server_name sindominio.net;
|
||||
|
||||
root /var/www/html;
|
||||
index index.php;
|
||||
|
||||
client_max_body_size 25M;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~* /(?:uploads|files)/.*\.php$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^(/[^/]+/)?files/(.+) {
|
||||
try_files /wp-content/blogs.dir/$blogid/files/$2 /wp-includes/ms-files.php?file=$2 ;
|
||||
access_log off;
|
||||
log_not_found off; expires max;
|
||||
}
|
||||
|
||||
location ^~ /blogs.dir {
|
||||
internal;
|
||||
alias /home/htdocs/wordpress/stable/wp-content/blogs.dir ;
|
||||
access_log off;
|
||||
log_not_found off; expires max;
|
||||
}
|
||||
|
||||
if (!-e $request_filename) {
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
|
||||
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args ;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_read_timeout 300;
|
||||
fastcgi_send_timeout 300;
|
||||
fastcgi_pass wp:9000;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/wordpress.access.log;
|
||||
error_log /var/log/nginx/wordpress.error.log;
|
||||
|
||||
}
|
28
php-fpm/Dockerfile
Normal file
28
php-fpm/Dockerfile
Normal file
@ -0,0 +1,28 @@
|
||||
FROM registry.sindominio.net/debian
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -qy install \
|
||||
php-fpm php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip \
|
||||
ghostscript wget openssl && \
|
||||
apt-get clean
|
||||
|
||||
RUN useradd -lMs /sbin/nologin wordpress
|
||||
|
||||
WORKDIR sindominio
|
||||
|
||||
COPY wordpress.conf /etc/php/7.3/fpm/pool.d/www.conf
|
||||
RUN mkdir /run/php/
|
||||
RUN mkdir logs
|
||||
|
||||
|
||||
RUN wget -O wordpress.tar.gz "https://wordpress.org/latest.tar.gz"
|
||||
RUN tar -xzf wordpress.tar.gz
|
||||
RUN rm wordpress.tar.gz
|
||||
COPY wp-config.php /sindominio/wordpress/wp-config.php
|
||||
RUN chown -R www-data:www-data /sindominio/wordpress
|
||||
|
||||
EXPOSE 9000
|
||||
VOLUME /sindominio/
|
||||
|
||||
CMD ["/usr/sbin/php-fpm7.3","--nodaemonize"]]
|
||||
|
16
php-fpm/wordpress.conf
Normal file
16
php-fpm/wordpress.conf
Normal file
@ -0,0 +1,16 @@
|
||||
[wordpress]
|
||||
|
||||
user = wordpress
|
||||
group = wordpress
|
||||
listen = 9000
|
||||
|
||||
listen.owner = wordpress
|
||||
listen.group = wordpress
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
php_admin_value[error_log] = /wordpress/logs/fpm-php.log
|
0
php-fpm/wp-config.php
Normal file
0
php-fpm/wp-config.php
Normal file
Loading…
Reference in New Issue
Block a user