commit 84a6ef5ec54d08a5300ab0f6c720bfd6058fbb88 Author: Lars Klemstein Date: Sun Nov 2 11:29:31 2025 +0100 initial version 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..69f7886 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,44 @@ +--- + +name: jansen_20251030 + +services: + wordpress: + image: custom-wordpress:6.8.3-php8.4-fpm-alpine + build: + context: docker_files/wordpress + container_name: jansen_20251030-wordpress + restart: unless-stopped + env_file: .env + environment: + WORDPRESS_DB_HOST: wordpress-mariadb:3306 + WORDPRESS_DB_USER: $MYSQL_USER + WORDPRESS_DB_PASSWORD: $MYSQL_PASSWORD + WORDPRESS_DB_NAME: $MYSQL_DATABASE + WORDPRESS_CONFIG_EXTRA: | + define('WP_SITEURL', 'https://jansen.knusperkerne.de'); + define('WP_HOME', 'https://jansen.knusperkerne.de'); + volumes: + - ./wordpress:/var/www/html + networks: + - wordpress-app + - wordpress-db + webserver: + depends_on: + - wordpress + image: nginx:1.29.3-alpine + container_name: jansen_20251030-nginx + restart: unless-stopped + ports: + - "127.0.0.1:13023: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..c378849 --- /dev/null +++ b/http-password.txt @@ -0,0 +1,2 @@ +User: gate +Password: A4KhFJCUuAcIgBw09+BSlN7. diff --git a/nginx-config/httppasswd b/nginx-config/httppasswd new file mode 100644 index 0000000..6290235 --- /dev/null +++ b/nginx-config/httppasswd @@ -0,0 +1 @@ +gate:$2b$12$UDKpn9NKHTdtBfGaIfypvO5mDe.dz6cwYBJ0IHClJgdaH29ytgfv2 diff --git a/nginx-config/nginx.conf b/nginx-config/nginx.conf new file mode 100644 index 0000000..f0e276f --- /dev/null +++ b/nginx-config/nginx.conf @@ -0,0 +1,46 @@ + +server { + listen 80; + listen [::]:80; + + server_name jansen.knusperkerne.de; + + index index.php index.html index.htm; + + root /var/www/html; + + 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..80690a7 --- /dev/null +++ b/project.yml @@ -0,0 +1,17 @@ +--- +project: + name: jansen_20251030 + dir: /srv/docker_services/www/sites/knusperkerne/jansen/20251030 + +app: + url: https://jansen.knusperkerne.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