forked from coop-cloud/wordpress
Compare commits
21 Commits
fix/3wc/wp
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| cf54575187 | |||
| b4db12f09c | |||
| e4b87c8ab9 | |||
| 7e170adbb4 | |||
| 66e0687456 | |||
| 9209f007cb | |||
| 69cf451b98 | |||
| 73a2e98d2e | |||
| 0e229168fc | |||
| 332ab0b97d | |||
|
3b598e82dd
|
|||
|
8e81f3f81c
|
|||
| a09bd166ad | |||
|
b4c5d04382
|
|||
|
3c013d39fd
|
|||
| 285bc01bef | |||
| 2ca12bff9c | |||
| da2e62b618 | |||
| 364b5c8b8a | |||
| 306b348961 | |||
| 3c1121b7ce |
@ -1,5 +1,5 @@
|
|||||||
TYPE=wordpress
|
TYPE=wordpress
|
||||||
TIMEOUT=300
|
#TIMEOUT=300
|
||||||
ENABLE_AUTO_UPDATE=true
|
ENABLE_AUTO_UPDATE=true
|
||||||
COMPOSE_FILE="compose.yml"
|
COMPOSE_FILE="compose.yml"
|
||||||
ENABLE_BACKUPS=true
|
ENABLE_BACKUPS=true
|
||||||
@ -28,6 +28,9 @@ LETS_ENCRYPT_ENV=production
|
|||||||
# PHP composer for plugin installation
|
# PHP composer for plugin installation
|
||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.composer.yml"
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.composer.yml"
|
||||||
|
|
||||||
|
# Self managed Wordpress for automatic updates
|
||||||
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.selfmanaged.yml"
|
||||||
|
|
||||||
#WORDPRESS_DEBUG=true
|
#WORDPRESS_DEBUG=true
|
||||||
|
|
||||||
## Additional extensions
|
## Additional extensions
|
||||||
@ -81,7 +84,6 @@ SECRET_DB_PASSWORD_VERSION=v1
|
|||||||
# 🚩🚩 dangerous, use only for development sites!
|
# 🚩🚩 dangerous, use only for development sites!
|
||||||
#CORS_ALLOW_ALL=1
|
#CORS_ALLOW_ALL=1
|
||||||
|
|
||||||
|
|
||||||
# FTP
|
# FTP
|
||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.ftp.yml"
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.ftp.yml"
|
||||||
#SECRET_FTP_PASS_VERSION=v1
|
#SECRET_FTP_PASS_VERSION=v1
|
||||||
|
|||||||
21
.gitignore
vendored
21
.gitignore
vendored
@ -1 +1,22 @@
|
|||||||
|
# direnv
|
||||||
/.envrc
|
/.envrc
|
||||||
|
|
||||||
|
# Environment files (may contain secrets)
|
||||||
|
.env
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# OS metadata
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Editor/IDE
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
*.bak
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
|||||||
23
abra.sh
23
abra.sh
@ -1,8 +1,8 @@
|
|||||||
export PHP_UPLOADS_CONF_VERSION=v4
|
export PHP_UPLOADS_CONF_VERSION=v4
|
||||||
export ENTRYPOINT_CONF_VERSION=v7
|
export ENTRYPOINT_CONF_VERSION=v8
|
||||||
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v2
|
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v2
|
||||||
export MSMTP_CONF_VERSION=v4
|
export MSMTP_CONF_VERSION=v4
|
||||||
export HTACCESS_CONF_VERSION=v2
|
export HTACCESS_CONF_VERSION=v3
|
||||||
export USERS_CONF_VERSION=v1
|
export USERS_CONF_VERSION=v1
|
||||||
|
|
||||||
wp() {
|
wp() {
|
||||||
@ -31,8 +31,6 @@ core_install(){
|
|||||||
wp "language core install $LOCALE"
|
wp "language core install $LOCALE"
|
||||||
wp "site switch-language $LOCALE"
|
wp "site switch-language $LOCALE"
|
||||||
wp "rewrite structure '/%year%/%monthnum%/%day%/%postname%/'"
|
wp "rewrite structure '/%year%/%monthnum%/%day%/%postname%/'"
|
||||||
wp "plugin install --activate disable-update-notifications"
|
|
||||||
wp "option update disable_notification_setting --format=json '{\"dpun_setting\":false,\"dwtu_setting\":false,\"dwcun_setting\":true}'"
|
|
||||||
if [ -n "$DEFAULT_USER_ROLE" ]
|
if [ -n "$DEFAULT_USER_ROLE" ]
|
||||||
then
|
then
|
||||||
wp "option set default_role $DEFAULT_USER_ROLE"
|
wp "option set default_role $DEFAULT_USER_ROLE"
|
||||||
@ -40,7 +38,20 @@ core_install(){
|
|||||||
wp "option set default_role subscriber"
|
wp "option set default_role subscriber"
|
||||||
fi
|
fi
|
||||||
wp "theme auto-updates enable --all"
|
wp "theme auto-updates enable --all"
|
||||||
wp 'plugin auto-updates enable --all' || exit 0
|
wp 'plugin auto-updates enable --all' || true
|
||||||
|
}
|
||||||
|
|
||||||
|
enable_auto_updates(){
|
||||||
|
wp "plugin deactivate disable-update-notifications --allow-root"
|
||||||
|
wp "plugin uninstall disable-update-notifications --allow-root"
|
||||||
|
wp "option delete disable_notification_setting --allow-root"
|
||||||
|
wp "plugin auto-updates enable --all --allow-root"
|
||||||
|
wp "theme auto-updates enable --all --allow-root"
|
||||||
|
}
|
||||||
|
|
||||||
|
disable_auto_updates(){
|
||||||
|
wp "plugin install --activate disable-update-notifications"
|
||||||
|
wp "option update disable_notification_setting --format=json '{\"dpun_setting\":false,\"dwtu_setting\":false,\"dwcun_setting\":true}'"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_authentik(){
|
set_authentik(){
|
||||||
@ -63,6 +74,8 @@ set_authentik(){
|
|||||||
\"endpoint_userinfo\":\"https://$AUTHENTIK_DOMAIN/application/o/userinfo/\",
|
\"endpoint_userinfo\":\"https://$AUTHENTIK_DOMAIN/application/o/userinfo/\",
|
||||||
\"endpoint_token\":\"https://$AUTHENTIK_DOMAIN/application/o/token/\",
|
\"endpoint_token\":\"https://$AUTHENTIK_DOMAIN/application/o/token/\",
|
||||||
\"endpoint_end_session\":\"https://$AUTHENTIK_DOMAIN/application/o/wordpress/end-session/\",
|
\"endpoint_end_session\":\"https://$AUTHENTIK_DOMAIN/application/o/wordpress/end-session/\",
|
||||||
|
\"endpoint_jwks\":\"https://$AUTHENTIK_DOMAIN/application/o/wordpress/jwks/\",
|
||||||
|
\"issuer\":\"https://$AUTHENTIK_DOMAIN/application/o/wordpress/\",
|
||||||
\"acr_values\":\"\",
|
\"acr_values\":\"\",
|
||||||
\"identity_key\":\"preferred_username\",
|
\"identity_key\":\"preferred_username\",
|
||||||
\"no_sslverify\":\"0\",
|
\"no_sslverify\":\"0\",
|
||||||
|
|||||||
@ -3,7 +3,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
ftp:
|
ftp:
|
||||||
image: atmoz/sftp
|
image: atmoz/sftp:alpine
|
||||||
secrets:
|
secrets:
|
||||||
- ftp_pass
|
- ftp_pass
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
21
compose.selfmanaged.yml
Normal file
21
compose.selfmanaged.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "wordpress:latest"
|
||||||
|
volumes:
|
||||||
|
- "wordpress:/var/www/html/"
|
||||||
|
environment:
|
||||||
|
WORDPRESS_CONFIG_EXTRA: |
|
||||||
|
define( 'AUTOMATIC_UPDATER_DISABLED', false );
|
||||||
|
define( 'WP_AUTO_UPDATE_CORE', true );
|
||||||
|
define( 'FS_METHOD', 'direct' );
|
||||||
|
${WORDPRESS_CONFIG_EXTRA}
|
||||||
|
|
||||||
|
ftp:
|
||||||
|
volumes:
|
||||||
|
- "wordpress:/home/ftp_user/"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
wordpress:
|
||||||
10
compose.yml
10
compose.yml
@ -3,7 +3,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: "wordpress:6.9.0"
|
image: "wordpress:6.9.4"
|
||||||
volumes:
|
volumes:
|
||||||
- "wordpress_content:/var/www/html/wp-content/"
|
- "wordpress_content:/var/www/html/wp-content/"
|
||||||
networks:
|
networks:
|
||||||
@ -48,7 +48,7 @@ services:
|
|||||||
order: start-first
|
order: start-first
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.swarm.network=proxy"
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls=true"
|
- "traefik.http.routers.${STACK_NAME}.tls=true"
|
||||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
||||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
||||||
@ -61,11 +61,11 @@ services:
|
|||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.regex=^https://(${REDIRECTS})/(.*)"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.regex=^https://(${REDIRECTS})/(.*)"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.replacement=https://${DOMAIN}/$${2}"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.replacement=https://${DOMAIN}/$${2}"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.permanent=true"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectregex.permanent=true"
|
||||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=2.17.0+6.9.0"
|
- "coop-cloud.${STACK_NAME}.version=2.19.2+6.9.4"
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: "mariadb:12.1"
|
image: "mariadb:12.2"
|
||||||
volumes:
|
volumes:
|
||||||
- "mariadb:/var/lib/mysql"
|
- "mariadb:/var/lib/mysql"
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@ -42,6 +42,20 @@ define('FORCE_SSL_ADMIN', true );
|
|||||||
define('COOKIE_DOMAIN', \$_SERVER['HTTP_HOST']);"
|
define('COOKIE_DOMAIN', \$_SERVER['HTTP_HOST']);"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
UPLOADS_HTACCESS=/var/www/html/wp-content/uploads/.htaccess
|
||||||
|
if [ ! -f "$UPLOADS_HTACCESS" ]; then
|
||||||
|
mkdir -p /var/www/html/wp-content/uploads
|
||||||
|
cat > "$UPLOADS_HTACCESS" <<'EOF'
|
||||||
|
# Prevent PHP execution in uploads directory
|
||||||
|
<FilesMatch "\.(?i:php|phtml|phar)$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R --from=root:root www-data:www-data /var/www/html/wp-content/
|
||||||
|
|
||||||
if [ -n "$@" ]; then
|
if [ -n "$@" ]; then
|
||||||
"$@"
|
"$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
# Protect sensitive files from direct access
|
||||||
|
<FilesMatch "^(wp-config\.php|\.htaccess|\.htpasswd|readme\.html|license\.txt)$">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
{{ if eq (env "MULTISITE") "" -}}
|
{{ if eq (env "MULTISITE") "" -}}
|
||||||
# BEGIN WordPress
|
# BEGIN WordPress
|
||||||
|
|
||||||
|
|||||||
1
release/2.17.1+6.9.0
Normal file
1
release/2.17.1+6.9.0
Normal file
@ -0,0 +1 @@
|
|||||||
|
Breaking change for openid plugin: The issuer must be provided, thus the set_authentik function now includes issuer and endpoint_jwks.
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": [
|
"extends": [
|
||||||
"config:base"
|
"config:recommended"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user