initial_commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.env
|
||||||
|
wordpress/
|
||||||
51
docker-compose.yml
Normal file
51
docker-compose.yml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
name: tt_blog_20251112
|
||||||
|
|
||||||
|
services:
|
||||||
|
wordpress:
|
||||||
|
user: "0:0"
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
command: ["/usr/local/bin/start.sh"]
|
||||||
|
image: wordpress:6.8.3-php8.4-fpm-alpine-customized
|
||||||
|
build:
|
||||||
|
context: docker_files/wordpress
|
||||||
|
container_name: tt_blog_20251112-wordpress
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: .env
|
||||||
|
environment:
|
||||||
|
WORDPRESS_DB_HOST: "$MYSQL_DB_HOST"
|
||||||
|
WORDPRESS_DB_USER: "$MYSQL_USER"
|
||||||
|
WORDPRESS_DB_PASSWORD: "$MYSQL_PASSWORD"
|
||||||
|
WORDPRESS_DB_NAME: "$MYSQL_DATABASE"
|
||||||
|
WORDPRESS_SKIP_INSTALL: "true"
|
||||||
|
volumes:
|
||||||
|
- ./wordpress:/var/www/html
|
||||||
|
- ./docker_files/wordpress/start.sh:/usr/local/bin/start.sh:ro
|
||||||
|
networks:
|
||||||
|
- 01_tt_blog_20251112_wordpress-app
|
||||||
|
- wordpress-db
|
||||||
|
webserver:
|
||||||
|
image: nginx:1.29.3-alpine
|
||||||
|
container_name: tt_blog_20251112-nginx
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:13027:80"
|
||||||
|
volumes:
|
||||||
|
- ./wordpress:/var/www/html
|
||||||
|
- ./nginx-config:/etc/nginx/conf.d
|
||||||
|
networks:
|
||||||
|
- 01_tt_blog_20251112_wordpress-app
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
container_name: wordpress-redis
|
||||||
|
restart: always
|
||||||
|
command: redis-server --save "" --appendonly no
|
||||||
|
networks:
|
||||||
|
- 01_tt_blog_20251112_wordpress-app
|
||||||
|
|
||||||
|
networks:
|
||||||
|
01_tt_blog_20251112_wordpress-app:
|
||||||
|
external: true
|
||||||
|
wordpress-db:
|
||||||
|
external: true
|
||||||
49
nginx-config/nginx.conf
Normal file
49
nginx-config/nginx.conf
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
|
||||||
|
server_name blog.tanjathomsen.de;
|
||||||
|
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
client_max_body_size 64M;
|
||||||
|
|
||||||
|
root /var/www/html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass wordpress:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
|
||||||
|
# Absolute path fixes 'Primary script unknown' / 'file not found' issues
|
||||||
|
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
|
||||||
|
# Optional but helps debugging
|
||||||
|
fastcgi_read_timeout 300;
|
||||||
|
fastcgi_buffering off;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
16
tools/inst_plugins.sh
Executable file
16
tools/inst_plugins.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
dc_wp() {
|
||||||
|
docker compose exec -u www-data wordpress wp $@
|
||||||
|
}
|
||||||
|
|
||||||
|
dc_wp plugin install redis-cache --activate
|
||||||
|
dc_wp redis enable
|
||||||
|
|
||||||
|
dc_wp plugin install wp-mail-smtp --activate
|
||||||
|
|
||||||
|
echo "Done." >&2
|
||||||
|
|
||||||
Reference in New Issue
Block a user