]> juplo.de Git - website/commitdiff
TEST:nowp
authorKai Moritz <kai@juplo.de>
Thu, 20 Nov 2025 21:46:51 +0000 (22:46 +0100)
committerKai Moritz <kai@juplo.de>
Thu, 20 Nov 2025 22:08:08 +0000 (23:08 +0100)
docker-compose.yml
snippets/fastcgi-php.conf
wordpress/wp-config.php [deleted file]

index d2ad6ff7021b7ce2ee09885ba517ae83d07927ca..c4a41ecda872201b949b061027961683cf149ec2 100644 (file)
@@ -15,23 +15,12 @@ services:
     read_only: true
     depends_on:
       - mariadb
-    environment:
-      WORDPRESS_DB_HOST: mariadb:3306
-      WORDPRESS_DB_USER: wordpress
-      WORDPRESS_DB_PASSWORD: I0vAUXKC
-      WORDPRESS_DB_NAME: wp_juplo
-      WORDPRESS_DB_CHARSET: latin1
-      WORDPRESS_DB_COLLATE: latin1_general_ci
-      WORDPRESS_DEBUG: 1
-      WORDPRESS_SECRET_KEY: vTelcON5v26YTrdtKfMvyYFuetRwaWyK2K4tfalgpr
-      WORDPRESS_TABLE_PREFIX: ''
     ports:
       - 9000:9000
     tmpfs:
       - /tmp
       - /run
     volumes:
-      - ./wordpress/wp-config.php:/usr/src/wordpress/wp-config.php:ro
       - ./wordpress/wp-content/themes/juplo-theme:/usr/src/wordpress/wp-content/themes/juplo-theme:ro
       - ./wordpress/wp-content/mu-plugins/debug-redirects.php:/usr/src/wordpress/wp-content/mu-plugins/debug-redirects.php:ro
       - ./wordpress/wp-content/plugins/classic-editor:/usr/src/wordpress/wp-content/plugins/classic-editor:ro
@@ -43,9 +32,9 @@ services:
     image: mariadb:10.11.15-jammy
     environment:
       MYSQL_ROOT_PASSWORD: juplo
-      MYSQL_DATABASE: wp_juplo
-      MYSQL_USER: wordpress
-      MYSQL_PASSWORD: I0vAUXKC
+      MYSQL_DATABASE: wordpress
+      MYSQL_USER: juplo
+      MYSQL_PASSWORD: geheim
     volumes:
-      - ./mariadb:/var/lib/mysql
+      - ./mariadb-nowp:/var/lib/mysql
     command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
index 00f5e7ad73cf151f59e160eab0c5d57e2818e869..d29247b6e0be82888b59f0c266130005b6408ed2 100644 (file)
@@ -2,7 +2,7 @@ fastcgi_split_path_info ^(.+\.php)(/.+)$;
 fastcgi_index index.php;
 include fastcgi_params;
 
-fastcgi_param SCRIPT_FILENAME /usr/src/wordpress$fastcgi_script_name;
+fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 fastcgi_param PATH_INFO $fastcgi_path_info;
 
 # fastcgi_param HTTP_HOST $host;
diff --git a/wordpress/wp-config.php b/wordpress/wp-config.php
deleted file mode 100644 (file)
index c68e003..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php\r
-/**\r
- * The base configuration for WordPress\r
- *\r
- * The wp-config.php creation script uses this file during the installation.\r
- * You don't have to use the web site, you can copy this file to "wp-config.php"\r
- * and fill in the values.\r
- *\r
- * This file contains the following configurations:\r
- *\r
- * * Database settings\r
- * * Secret keys\r
- * * Database table prefix\r
- * * ABSPATH\r
- *\r
- * This has been slightly modified (to read environment variables) for use in Docker.\r
- *\r
- * @link https://wordpress.org/documentation/article/editing-wp-config-php/\r
- *\r
- * @package WordPress\r
- */\r
-\r
-// IMPORTANT: this file needs to stay in-sync with https://github.com/WordPress/WordPress/blob/master/wp-config-sample.php\r
-// (it gets parsed by the upstream wizard in https://github.com/WordPress/WordPress/blob/f27cb65e1ef25d11b535695a660e7282b98eb742/wp-admin/setup-config.php#L356-L392)\r
-\r
-// a helper function to lookup "env_FILE", "env", then fallback\r
-if (!function_exists('getenv_docker')) {\r
-       // https://github.com/docker-library/wordpress/issues/588 (WP-CLI will load this file 2x)\r
-       function getenv_docker($env, $default) {\r
-               if ($fileEnv = getenv($env . '_FILE')) {\r
-                       return rtrim(file_get_contents($fileEnv), "\r\n");\r
-               }\r
-               else if (($val = getenv($env)) !== false) {\r
-                       return $val;\r
-               }\r
-               else {\r
-                       return $default;\r
-               }\r
-       }\r
-}\r
-\r
-// ** Database settings - You can get this info from your web host ** //\r
-/** The name of the database for WordPress */\r
-define( 'DB_NAME', getenv_docker('WORDPRESS_DB_NAME', 'wordpress') );\r
-\r
-/** Database username */\r
-define( 'DB_USER', getenv_docker('WORDPRESS_DB_USER', 'example username') );\r
-\r
-/** Database password */\r
-define( 'DB_PASSWORD', getenv_docker('WORDPRESS_DB_PASSWORD', 'example password') );\r
-\r
-/**\r
- * Docker image fallback values above are sourced from the official WordPress installation wizard:\r
- * https://github.com/WordPress/WordPress/blob/1356f6537220ffdc32b9dad2a6cdbe2d010b7a88/wp-admin/setup-config.php#L224-L238\r
- * (However, using "example username" and "example password" in your database is strongly discouraged.  Please use strong, random credentials!)\r
- */\r
-\r
-/** Database hostname */\r
-define( 'DB_HOST', getenv_docker('WORDPRESS_DB_HOST', 'mysql') );\r
-\r
-/** Database charset to use in creating database tables. */\r
-define( 'DB_CHARSET', getenv_docker('WORDPRESS_DB_CHARSET', 'utf8') );\r
-\r
-/** The database collate type. Don't change this if in doubt. */\r
-define( 'DB_COLLATE', getenv_docker('WORDPRESS_DB_COLLATE', '') );\r
-\r
-/**#@+\r
- * Authentication unique keys and salts.\r
- *\r
- * Change these to different unique phrases! You can generate these using\r
- * the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.\r
- *\r
- * You can change these at any point in time to invalidate all existing cookies.\r
- * This will force all users to have to log in again.\r
- *\r
- * @since 2.6.0\r
- */\r
-define( 'AUTH_KEY',         getenv_docker('WORDPRESS_AUTH_KEY',         'put your unique phrase here') );\r
-define( 'SECURE_AUTH_KEY',  getenv_docker('WORDPRESS_SECURE_AUTH_KEY',  'put your unique phrase here') );\r
-define( 'LOGGED_IN_KEY',    getenv_docker('WORDPRESS_LOGGED_IN_KEY',    'put your unique phrase here') );\r
-define( 'NONCE_KEY',        getenv_docker('WORDPRESS_NONCE_KEY',        'put your unique phrase here') );\r
-define( 'AUTH_SALT',        getenv_docker('WORDPRESS_AUTH_SALT',        'put your unique phrase here') );\r
-define( 'SECURE_AUTH_SALT', getenv_docker('WORDPRESS_SECURE_AUTH_SALT', 'put your unique phrase here') );\r
-define( 'LOGGED_IN_SALT',   getenv_docker('WORDPRESS_LOGGED_IN_SALT',   'put your unique phrase here') );\r
-define( 'NONCE_SALT',       getenv_docker('WORDPRESS_NONCE_SALT',       'put your unique phrase here') );\r
-// (See also https://wordpress.stackexchange.com/a/152905/199287)\r
-\r
-/**#@-*/\r
-\r
-/**\r
- * WordPress database table prefix.\r
- *\r
- * You can have multiple installations in one database if you give each\r
- * a unique prefix. Only numbers, letters, and underscores please!\r
- */\r
-$table_prefix = getenv_docker('WORDPRESS_TABLE_PREFIX', 'wp_');\r
-\r
-/**\r
- * For developers: WordPress debugging mode.\r
- *\r
- * Change this to true to enable the display of notices during development.\r
- * It is strongly recommended that plugin and theme developers use WP_DEBUG\r
- * in their development environments.\r
- *\r
- * For information on other constants that can be used for debugging,\r
- * visit the documentation.\r
- *\r
- * @link https://wordpress.org/documentation/article/debugging-in-wordpress/\r
- */\r
-define( 'WP_DEBUG', !!getenv_docker('WORDPRESS_DEBUG', '') );\r
-\r
-/* Add any custom values between this line and the "stop editing" line. */\r
-\r
-// If we're behind a proxy server and using HTTPS, we need to alert WordPress of that fact\r
-// see also https://wordpress.org/support/article/administration-over-ssl/#using-a-reverse-proxy\r
-if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {\r
-       $_SERVER['HTTPS'] = 'on';\r
-}\r
-// (we include this by default because reverse proxying is extremely common in container environments)\r
-\r
-if ($configExtra = getenv_docker('WORDPRESS_CONFIG_EXTRA', '')) {\r
-       eval($configExtra);\r
-}\r
-\r
-define('FORCE_SSL_ADMIN', false);\r
-\r
-if (isset($_SERVER['HTTP_HOST'])) {\r
-  define('WP_HOME',  'http://' . $_SERVER['HTTP_HOST']);\r
-  error_log("WP_HOME = " . WP_HOME);\r
-  define('WP_SITEURL','http://' . $_SERVER['HTTP_HOST']);\r
-  error_log("WP_SITEURL = " . WP_SITEURL);\r
-}\r
-\r
-/* That's all, stop editing! Happy publishing. */\r
-\r
-/** Absolute path to the WordPress directory. */\r
-if ( ! defined( 'ABSPATH' ) ) {\r
-       define( 'ABSPATH', __DIR__ . '/' );\r
-}\r
-\r
-error_log("ABSPATH = " . ABSPATH);\r
-\r
-/** Sets up WordPress vars and included files. */\r
-require_once ABSPATH . 'wp-settings.php';\r