modified
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Ignore everything in the volume folder
|
||||
volume/*
|
||||
|
||||
# But not the .gitkeep file
|
||||
!volume/.gitkeep
|
||||
@@ -1,41 +1,32 @@
|
||||
version: '3.1'
|
||||
|
||||
version: '3.8'
|
||||
services:
|
||||
|
||||
wordpress:
|
||||
4netplayers-wordpress:
|
||||
image: wordpress:latest
|
||||
container_name: wordpress
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:80 # change
|
||||
container_name: 4netplayers-wordpress
|
||||
restart: on-failure
|
||||
environment:
|
||||
WORDPRESS_DB_USER: zino # change
|
||||
WORDPRESS_DB_PASSWORD: 9JMarSLGiwRKM6fb # change
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_USER: zino
|
||||
WORDPRESS_DB_PASSWORD: D7S8f9EsrvsUPmyT
|
||||
WORDPRESS_DB_NAME: wp
|
||||
WORDPRESS_DEBUG: 0
|
||||
WORDPRESS_DEBUG: 1
|
||||
volumes:
|
||||
- /home/zino/projects/dockers/docker-wordpress-taoghq/volumes/wordpress:/var/www/html # change
|
||||
- ./volumes/wordpress:/var/www/html
|
||||
networks:
|
||||
- wordpress
|
||||
- web
|
||||
|
||||
db:
|
||||
image: linuxserver/mariadb:latest
|
||||
container_name: wordpress-mariadb
|
||||
4netplayers-wordpress-mariadb:
|
||||
image: mariadb:latest
|
||||
container_name: 4netplayers-wordpress-mariadb
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_USER: zino # change
|
||||
MYSQL_PASSWORD: 9JMarSLGiwRKM6fb # change
|
||||
MYSQL_DATABASE: wp
|
||||
MYSQL_USER: zino
|
||||
MYSQL_PASSWORD: D7S8f9EsrvsUPmyT
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
||||
MYSQL_LOG_CONSOLE: true
|
||||
TZ: "Europe/Berlin"
|
||||
volumes:
|
||||
- /home/zino/projects/dockers/docker-wordpress-taoghq/volumes/db:/var/lib/mysql # change
|
||||
- ./volumes/db:/var/lib/mysql
|
||||
networks:
|
||||
- wordpress
|
||||
|
||||
networks:
|
||||
wordpress:
|
||||
external: false
|
||||
name: wordpress
|
||||
- web
|
||||
@@ -1,54 +0,0 @@
|
||||
server {
|
||||
listen *:443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name taoghq.com www.taoghq.com;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
|
||||
root /home/zino/projects/dockers/docker-wordpress-taoghq/volumes/wordpress;
|
||||
index index.php;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/taoghq.com/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/taoghq.com/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
location ~ /(\.user\.ini|debug\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
client_max_body_size 32m;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
add_header Content-Security-Policy "font-src * data: blob: 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline';" always;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
if (!-e $request_filename) {
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
|
||||
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
|
||||
}
|
||||
}
|
||||
63
vhost.conf
Normal file
63
vhost.conf
Normal file
@@ -0,0 +1,63 @@
|
||||
server {
|
||||
root /home/zino/projects/dockers/4netplayers-wordpress/volumes/wordpress;
|
||||
server_name 4netplayers.zinomedia.de;
|
||||
index index.php;
|
||||
|
||||
client_max_body_size 32m;
|
||||
|
||||
listen [::]:443 ssl; # managed by Certbot
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/4netplayers.zinomedia.de/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/4netplayers.zinomedia.de/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
location ~ /(\.user\.ini|debug\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
add_header Content-Security-Policy "font-src * data: blob: 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline';" always;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://127.0.0.1:8095;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
if (!-e $request_filename) {
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
|
||||
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = 4netplayers.zinomedia.de) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name 4netplayers.zinomedia.de;
|
||||
return 404; # managed by Certbot
|
||||
}
|
||||
0
volumes/.gitkeep
Normal file
0
volumes/.gitkeep
Normal file
Reference in New Issue
Block a user