Serve WordPress under its public HTTPS subdirectory
This commit is contained in:
parent
ced199bbbd
commit
83369de516
1 changed files with 6 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ services:
|
||||||
wordpress:
|
wordpress:
|
||||||
image: wordpress:php8.3-apache
|
image: wordpress:php8.3-apache
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
working_dir: /var/www/html/wordpress
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:${WORDPRESS_PORT:-18404}:80"
|
- "127.0.0.1:${WORDPRESS_PORT:-18404}:80"
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -9,10 +10,14 @@ services:
|
||||||
WORDPRESS_DB_NAME: wordpress
|
WORDPRESS_DB_NAME: wordpress
|
||||||
WORDPRESS_DB_USER: wordpress
|
WORDPRESS_DB_USER: wordpress
|
||||||
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:?Set a database password in the Stack secret bindings}
|
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD:?Set a database password in the Stack secret bindings}
|
||||||
|
WORDPRESS_PUBLIC_URL: ${WORDPRESS_PUBLIC_URL:?Set the public HTTPS URL ending in /wordpress}
|
||||||
WORDPRESS_CONFIG_EXTRA: |
|
WORDPRESS_CONFIG_EXTRA: |
|
||||||
define('DISALLOW_FILE_EDIT', true);
|
define('DISALLOW_FILE_EDIT', true);
|
||||||
|
define('WP_HOME', getenv('WORDPRESS_PUBLIC_URL'));
|
||||||
|
define('WP_SITEURL', getenv('WORDPRESS_PUBLIC_URL'));
|
||||||
|
define('FORCE_SSL_ADMIN', true);
|
||||||
volumes:
|
volumes:
|
||||||
- wordpress:/var/www/html
|
- wordpress:/var/www/html/wordpress
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue