Add Wordpress
This commit is contained in:
3
Wordpress/.env
Normal file
3
Wordpress/.env
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
MYSQL_ROOT_PASSWORD=
|
||||||
|
MYSQL_USER=
|
||||||
|
MYSQL_PASSWORD=
|
||||||
39
Wordpress/docker-compose.yml
Normal file
39
Wordpress/docker-compose.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: mysql:8.0
|
||||||
|
container_name: db
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: .env
|
||||||
|
environment:
|
||||||
|
- MYSQL_DATABASE=wordpress
|
||||||
|
volumes:
|
||||||
|
- ./db:/var/lib/mysql
|
||||||
|
command: '--default-authentication-plugin=mysql_native_password'
|
||||||
|
|
||||||
|
wordpress:
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
image: wordpress:6.5.0-php8.3-fpm-alpine
|
||||||
|
container_name: wordpress
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: .env
|
||||||
|
environment:
|
||||||
|
- WORDPRESS_DB_HOST=db:3306
|
||||||
|
- WORDPRESS_DB_USER=$MYSQL_USER
|
||||||
|
- WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD
|
||||||
|
- WORDPRESS_DB_NAME=wordpress
|
||||||
|
volumes:
|
||||||
|
- ./data:/var/www/html
|
||||||
|
|
||||||
|
web:
|
||||||
|
depends_on:
|
||||||
|
- wp
|
||||||
|
image: nginx:stable-alpine
|
||||||
|
container_name: web
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
- ./data:/var/www/html:ro
|
||||||
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
36
Wordpress/nginx.conf
Normal file
36
Wordpress/nginx.conf
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
root /var/www/html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass wordpress:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.ht {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /favicon.ico {
|
||||||
|
log_not_found off; access_log off;
|
||||||
|
}
|
||||||
|
location = /robots.txt {
|
||||||
|
log_not_found off; access_log off; allow all;
|
||||||
|
}
|
||||||
|
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
|
||||||
|
expires max;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user