change: www volume managed better
This commit is contained in:
parent
49a136c709
commit
f5c5b31fbd
7 changed files with 43 additions and 38 deletions
|
|
@ -19,6 +19,8 @@ RUN adduser -D -S -G www www
|
|||
|
||||
# add config
|
||||
COPY /conf/ /etc/php83/
|
||||
COPY /conf/wwwmore/ /conf/wwwmore/
|
||||
COPY /run.sh /run.sh
|
||||
|
||||
# start
|
||||
CMD ["php-fpm83", "-F"]
|
||||
CMD ["/run.sh"]
|
||||
|
|
|
|||
3
srcs/requirements/wordpress/conf/wwwmore/497.php
Normal file
3
srcs/requirements/wordpress/conf/wwwmore/497.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
http_response_code(301);
|
||||
header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER['REQUEST_URI']);
|
||||
102
srcs/requirements/wordpress/conf/wwwmore/wp-config.php
Normal file
102
srcs/requirements/wordpress/conf/wwwmore/wp-config.php
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
/**
|
||||
* The base configuration for WordPress
|
||||
*
|
||||
* The wp-config.php creation script uses this file during the installation.
|
||||
* You don't have to use the website, you can copy this file to "wp-config.php"
|
||||
* and fill in the values.
|
||||
*
|
||||
* This file contains the following configurations:
|
||||
*
|
||||
* * Database settings
|
||||
* * Secret keys
|
||||
* * Database table prefix
|
||||
* * ABSPATH
|
||||
*
|
||||
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
// ** Database settings - You can get this info from your web host ** //
|
||||
/** The name of the database for WordPress */
|
||||
define( 'DB_NAME', 'wp' );
|
||||
|
||||
/** Database username */
|
||||
define( 'DB_USER', 'www' );
|
||||
|
||||
/** Database password */
|
||||
define( 'DB_PASSWORD', 'ultraPassword' ); # TODO(secret)
|
||||
|
||||
/** Database hostname */
|
||||
define( 'DB_HOST', 'mariadb:3306' );
|
||||
|
||||
/** Database charset to use in creating database tables. */
|
||||
define( 'DB_CHARSET', 'utf8' );
|
||||
|
||||
/** The database collate type. Don't change this if in doubt. */
|
||||
define( 'DB_COLLATE', '' );
|
||||
|
||||
/**#@+
|
||||
* Authentication unique keys and salts.
|
||||
*
|
||||
* Change these to different unique phrases! You can generate these using
|
||||
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
|
||||
*
|
||||
* You can change these at any point in time to invalidate all existing cookies.
|
||||
* This will force all users to have to log in again.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
define('AUTH_KEY', 'Uy[FLsUl1v7j]g;Wki6Wm`Bj-eaN(U-7Bi:*?V^kw4AGljWA{0@7_5f$$ziS;OiP');
|
||||
define('SECURE_AUTH_KEY', '_$gvxQP0M4okT|-`/r$np!2zmdb[|YMo@7.kY.N![6SD.-U#[]<)ErHH-p2}nzh<');
|
||||
define('LOGGED_IN_KEY', 'F~X|uM-i4asv*i>c]EE<+5<X;L0D@W+,:$^g]V1$T|V2>BAo{3/)5Oc|(U30#2An');
|
||||
define('NONCE_KEY', 'EwQ+Jo#/Zr-I_,nJu|)i1.Bfzm:b!5d.ku%%+Ihw.)l-]0y 2^;=4HR1XB$B!;m66');
|
||||
define('AUTH_SALT', 'p_&.BA.mTs]RQEM(Q@F0yB`.@INfW@6L-<%%cd*@I-w iOlEqC@[I0aLbuYNLk}O9');
|
||||
define('SECURE_AUTH_SALT', '$H?b*kvJ:uA6DyPLwAJsh8:n}P.:[-N<,$/zl?,|`Vu++qC}F,{YKw&8CM`@@d*t');
|
||||
define('LOGGED_IN_SALT', ',6~y7[-Z}Hj/d&C!M[_|FD]R0>YMTO)s}xD`?.{ Ich:>5j!W`T9~~wef-WLJ:U#');
|
||||
define('NONCE_SALT', '%%-8d||zvI0s,giZmR7Lk(nhG|uH8c~U{kdB|2.v?Z+@3hr&nlk<@V22;.Ef8chSv');
|
||||
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* WordPress database table prefix.
|
||||
*
|
||||
* You can have multiple installations in one database if you give each
|
||||
* a unique prefix. Only numbers, letters, and underscores please!
|
||||
*
|
||||
* At the installation time, database tables are created with the specified prefix.
|
||||
* Changing this value after WordPress is installed will make your site think
|
||||
* it has not been installed.
|
||||
*
|
||||
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#table-prefix
|
||||
*/
|
||||
$table_prefix = 'wp_';
|
||||
|
||||
/**
|
||||
* For developers: WordPress debugging mode.
|
||||
*
|
||||
* Change this to true to enable the display of notices during development.
|
||||
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
||||
* in their development environments.
|
||||
*
|
||||
* For information on other constants that can be used for debugging,
|
||||
* visit the documentation.
|
||||
*
|
||||
* @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
|
||||
*/
|
||||
define( 'WP_DEBUG', true ); # TODO(debug)
|
||||
|
||||
/* Add any custom values between this line and the "stop editing" line. */
|
||||
|
||||
|
||||
|
||||
/* That's all, stop editing! Happy publishing. */
|
||||
|
||||
/** Absolute path to the WordPress directory. */
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
define( 'ABSPATH', __DIR__ . '/' );
|
||||
}
|
||||
|
||||
/** Sets up WordPress vars and included files. */
|
||||
require_once ABSPATH . 'wp-settings.php';
|
||||
34
srcs/requirements/wordpress/run.sh
Executable file
34
srcs/requirements/wordpress/run.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo
|
||||
|
||||
dirisempty()
|
||||
{
|
||||
[ -z "$( ls -A "$1" )" ]
|
||||
}
|
||||
|
||||
if dirisempty /www
|
||||
then
|
||||
echo "download and uncompress wordpress release..."
|
||||
echo
|
||||
apk add curl
|
||||
apk fix
|
||||
rm -rf /build
|
||||
mkdir -p "/build/www/"
|
||||
curl https://wordpress.org/latest.tar.gz | tar zx -C /build/www
|
||||
chmod -R 777 /www
|
||||
mv $(find /build/www/wordpress -maxdepth 1 -mindepth 1) /www
|
||||
rm -rf /build
|
||||
echo
|
||||
echo "add files from /conf/wwwmore/"
|
||||
echo
|
||||
cp -r /conf/wwwmore/. /www
|
||||
echo "www directory created!"
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "to recreate the www directory, remove the www volume of this compose."
|
||||
echo
|
||||
|
||||
php-fpm83 -F
|
||||
Loading…
Add table
Add a link
Reference in a new issue