svg
This commit is contained in:
11
misc/wordpress/containers/wordpress/.htaccess
Normal file
11
misc/wordpress/containers/wordpress/.htaccess
Normal file
@ -0,0 +1,11 @@
|
||||
RewriteEngine On
|
||||
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.php$ - [L]
|
||||
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
|
||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^ - [L]
|
||||
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
|
||||
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
|
||||
RewriteRule . index.php [L]
|
23
misc/wordpress/containers/wordpress/Dockerfile
Executable file
23
misc/wordpress/containers/wordpress/Dockerfile
Executable file
@ -0,0 +1,23 @@
|
||||
FROM reg.cadoles.com/envole/nineapache:8.1
|
||||
|
||||
# Paquet necessaire pour wordpress
|
||||
RUN apk add php81-mysqli
|
||||
|
||||
# Installation de wp-cli
|
||||
COPY wp-cli.phar /usr/local/bin/wp
|
||||
RUN chmod +x /usr/local/bin/wp
|
||||
|
||||
# Installation des sources wordpress
|
||||
COPY apache.conf /etc/apache2/conf.d/zapp.conf
|
||||
RUN wp core download --path=/app/public --locale=fr_FR
|
||||
#COPY .htaccess /app/public/.htaccess
|
||||
|
||||
RUN mkdir /docker
|
||||
COPY entrypoint.sh /docker/entrypoint.sh
|
||||
RUN chmod +x /docker/entrypoint.sh
|
||||
|
||||
RUN chown -R apache:apache /app/public
|
||||
RUN find /app/public -type d -exec chmod 755 {} +
|
||||
RUN find /app/public -type f -exec chmod 644 {} +
|
||||
|
||||
CMD /docker/entrypoint.sh && /etc/apache2/apache2.sh
|
24
misc/wordpress/containers/wordpress/apache.conf
Normal file
24
misc/wordpress/containers/wordpress/apache.conf
Normal file
@ -0,0 +1,24 @@
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
ServerName nineapache.local
|
||||
DocumentRoot "/app/public"
|
||||
Alias /wordpress /app/public
|
||||
<Directory "/app/public">
|
||||
Options FollowSymLinks
|
||||
AllowOverride Limit Options FileInfo
|
||||
DirectoryIndex index.php
|
||||
Require all granted
|
||||
|
||||
RewriteEngine On
|
||||
RewriteBase /wordpress/
|
||||
|
||||
RewriteRule ^index\.php$ - [L]
|
||||
|
||||
# add a trailing slash to /wp-admin
|
||||
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
|
||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^ - [L]
|
||||
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
|
||||
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
|
||||
RewriteRule . index.php [L]
|
||||
</Directory>
|
25
misc/wordpress/containers/wordpress/entrypoint.sh
Normal file
25
misc/wordpress/containers/wordpress/entrypoint.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
cd /app/public
|
||||
|
||||
|
||||
wp config create \
|
||||
--allow-root \
|
||||
--dbhost="${WORDPRESS_DB_HOST}" \
|
||||
--dbname="${WORDPRESS_DB_NAME}" \
|
||||
--dbuser="${WORDPRESS_DB_USER}" \
|
||||
--dbpass="${WORDPRESS_DB_PASSWORD}" \
|
||||
--dbcharset="utf8mb4" \
|
||||
--locale="fr_FR"
|
||||
|
||||
wp core multisite-install \
|
||||
--allow-root \
|
||||
--url="${WORDPRESS_WEBURL}" \
|
||||
--title="${WORDPRESS_TITLE}" \
|
||||
--admin_user="${WORDPRESS_USER}" \
|
||||
--admin_password="${WORDPRESS_PASSWORD}" \
|
||||
--admin_email="${WORDPRESS_EMAIL}" \
|
||||
--skip-email
|
||||
|
||||
exec $@
|
BIN
misc/wordpress/containers/wordpress/wp-cli.phar
Normal file
BIN
misc/wordpress/containers/wordpress/wp-cli.phar
Normal file
Binary file not shown.
Reference in New Issue
Block a user