From e8c5cfc113ebdadbef950806fe8013b122b666a3 Mon Sep 17 00:00:00 2001 From: Lars Klemstein Date: Tue, 4 Nov 2025 22:45:22 +0100 Subject: [PATCH] initial version --- .gitignore | 3 +++ docker-compose.yml | 46 +++++++++++++++++++++++++++++++++++++++ http-password.txt | 2 ++ nginx-config/httppasswd | 1 + nginx-config/nginx.conf | 48 +++++++++++++++++++++++++++++++++++++++++ project.yml | 17 +++++++++++++++ 6 files changed, 117 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml create mode 100644 http-password.txt create mode 100644 nginx-config/httppasswd create mode 100644 nginx-config/nginx.conf create mode 100644 project.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..67b6611 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.env +wordpress/ +http-auth-pwd.txt diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b889631 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,46 @@ +--- + +name: wp-junisthomsen-20251104 + +services: + wordpress: + image: custom-wordpress:6.8.3-php8.4-fpm-alpine + build: + context: docker_files/wordpress + container_name: wp-junisthomsen-20251104-wordpress + restart: unless-stopped + env_file: .env + user: "1000:997" + environment: + WORDPRESS_DB_HOST: "wordpress-mariadb:3306" + WORDPRESS_DB_USER: "$MYSQL_USER" + WORDPRESS_DB_PASSWORD: "$MYSQL_PASSWORD" + WORDPRESS_DB_NAME: "$MYSQL_DATABASE" + WORDPRESS_SKIP_INSTALL: "false" + WORDPRESS_CONFIG_EXTRA: | + define('WP_SITEURL', 'https://www.junisthomsen.de'); + define('WP_HOME', 'https://www.junisthomsen.de'); + volumes: + - ./wordpress:/var/www/html + networks: + - wordpress-app + - wordpress-db + webserver: + depends_on: + - wordpress + image: nginx:1.29.3-alpine + container_name: wp-junisthomsen-20251104-nginx + restart: unless-stopped + ports: + - "127.0.0.1:13032:80" + volumes: + - ./wordpress:/var/www/html + - ./nginx-config:/etc/nginx/conf.d + networks: + - wordpress-app + +networks: + wordpress-app: + driver: bridge + wordpress-db: + external: true diff --git a/http-password.txt b/http-password.txt new file mode 100644 index 0000000..f8c8df5 --- /dev/null +++ b/http-password.txt @@ -0,0 +1,2 @@ +User: gate +Password: ho.2MTg4.6XumJGs;dRdXfQX diff --git a/nginx-config/httppasswd b/nginx-config/httppasswd new file mode 100644 index 0000000..b376682 --- /dev/null +++ b/nginx-config/httppasswd @@ -0,0 +1 @@ +gate:$2b$12$ebAHx9i61zTB58vdo5aMXOgz/LBMnXoL9.731VT13USmzGo/fHdru diff --git a/nginx-config/nginx.conf b/nginx-config/nginx.conf new file mode 100644 index 0000000..449cbd8 --- /dev/null +++ b/nginx-config/nginx.conf @@ -0,0 +1,48 @@ + +server { + listen 80; + listen [::]:80; + + server_name www.junisthomsen.de; + + index index.php index.html index.htm; + + root /var/www/html; + + client_max_body_size 64M; + + location / { + try_files $uri $uri/ /index.php$is_args$args; + + auth_basic "Restricted Area"; + auth_basic_user_file "/etc/nginx/conf.d/httppasswd"; + } + + 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; + } +} + diff --git a/project.yml b/project.yml new file mode 100644 index 0000000..23a0bf0 --- /dev/null +++ b/project.yml @@ -0,0 +1,17 @@ +--- +project: + name: wp-junisthomsen-20251104 + dir: /srv/docker_services/www/sites/junisthomsen/www/20251104 + +app: + url: https://www.junisthomsen.de + + wordpress: + image: wordpress:6.8.3-php8.4-fpm-alpine + + nginx: + image: nginx:1.29.3-alpine + set-http-base-auth: true + +mysql: + host-and-port: wordpress-mariadb:3306