1st working conf
This commit is contained in:
@@ -11,10 +11,11 @@ services:
|
||||
environment:
|
||||
WORDPRESS_DB_USER: zino # change
|
||||
WORDPRESS_DB_PASSWORD: 9JMarSLGiwRKM6fb # change
|
||||
WORDPRESS_DB_NAME: wp
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_NAME: wp
|
||||
WORDPRESS_DEBUG: 0
|
||||
volumes:
|
||||
- path/to/wordpress/volume/dir:/var/www/html # change
|
||||
- /home/zino/projects/dockers/docker-wordpress-taoghq/volumes/wordpress:/var/www/html # change
|
||||
networks:
|
||||
- wordpress
|
||||
|
||||
@@ -23,14 +24,14 @@ services:
|
||||
container_name: wordpress-mariadb
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_USER="zino" # change
|
||||
- MYSQL_PASSWORD="9JMarSLGiwRKM6fb" # change
|
||||
- MYSQL_DATABASE="wp"
|
||||
- MYSQL_ROOT_PASSWORD="HJtxYtESugUZ89gX" # change
|
||||
- MYSQL_LOG_CONSOLE=true
|
||||
- TZ="Europe/Berlin"
|
||||
MYSQL_USER: zino # change
|
||||
MYSQL_PASSWORD: 9JMarSLGiwRKM6fb # change
|
||||
MYSQL_DATABASE: wp
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
||||
MYSQL_LOG_CONSOLE: true
|
||||
TZ: "Europe/Berlin"
|
||||
volumes:
|
||||
- path/to/db/volume/dir:/var/lib/mysql # change
|
||||
- /home/zino/projects/dockers/docker-wordpress-taoghq/volumes/db:/var/lib/mysql # change
|
||||
networks:
|
||||
- wordpress
|
||||
|
||||
|
||||
50
nginx-sample.conf
Normal file
50
nginx-sample.conf
Normal file
@@ -0,0 +1,50 @@
|
||||
server {
|
||||
listen *:443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name taoghq.com www.taoghq.com;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user