Compare commits
2 Commits
c19b73e3f0
...
9079afd570
| Author | SHA1 | Date | |
|---|---|---|---|
| 9079afd570 | |||
| 93e0971050 |
@@ -11,26 +11,30 @@
|
||||
# - Change ports
|
||||
|
||||
# TBD locate these at ../../Volumes and create `prep.sh` script.
|
||||
volumes:
|
||||
wordpress:
|
||||
db:
|
||||
#volumes:
|
||||
# wordpress:
|
||||
# db:
|
||||
|
||||
services:
|
||||
|
||||
wp-app:
|
||||
container_name: wp-app
|
||||
image: wordpress
|
||||
depends_on:
|
||||
- wp-db
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:80
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: wp-db
|
||||
WORDPRESS_DB_USER: $WORDPRESS_DB_USER
|
||||
WORDPRESS_DB_PASSWORD: $WORDPRESS_DB_PASSWORD
|
||||
WORDPRESS_DB_NAME: $WORDPRESS_DB_NAME
|
||||
WORDPRESS_DB_NAME: $MARIADB_DATABASE
|
||||
WORDPRESS_DB_USER: $MARIADB_USER
|
||||
WORDPRESS_DB_PASSWORD: $MARIADB_PASSWORD
|
||||
WORDPRESS_DEBUG: $WORDPRESS_DEBUG
|
||||
WP_CPU: $WP_CPU
|
||||
WP_MEM: $WP_MEM
|
||||
volumes:
|
||||
- wordpress:/var/www/html
|
||||
- ../../Volumes/WordPress/wordpress:/var/www/html
|
||||
deploy:
|
||||
mode: global
|
||||
resources:
|
||||
@@ -39,17 +43,20 @@ services:
|
||||
memory: $WP_MEM
|
||||
|
||||
wp-db:
|
||||
image: mysql:8.0
|
||||
container_name: wp-db
|
||||
image: mariadb:lts
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_DATABASE: $WORDPRESS_DB_NAME
|
||||
MYSQL_USER: $WORDPRESS_DB_USER
|
||||
MYSQL_PASSWORD: WORDPRESS_DB_PASSWORD
|
||||
MYSQL_RANDOM_ROOT_PASSWORD: '1'
|
||||
# https://mariadb.com/docs/server/server-management/automated-mariadb-deployment-and-administration/docker-and-mariadb/mariadb-server-docker-official-image-environment-variables
|
||||
MARIADB_DATABASE: $MARIADB_DATABASE
|
||||
MARIADB_USER: $MARIADB_USER
|
||||
MARIADB_PASSWORD: MARIADB_PASSWORD
|
||||
MARIADB_ROOT_PASSWORD: $MARIADB_ROOT_PASSWORD
|
||||
MARIADB_AUTO_UPGRADE: $MARIADB_AUTO_UPGRADE
|
||||
WP_CPU_DB: $WP_CPU_DB
|
||||
WP_MEM_DB: $WP_MEM_DB
|
||||
volumes:
|
||||
- db:/var/lib/mysql
|
||||
- ../../Volumes/WordPress/mariadb:/var/lib/mysql
|
||||
deploy:
|
||||
mode: global
|
||||
resources:
|
||||
|
||||
@@ -2,14 +2,32 @@
|
||||
|
||||
COMPOSE_BAKE=true
|
||||
|
||||
|
||||
## WordPress ##
|
||||
|
||||
# Uncomment this to get ebug output in the log.
|
||||
#WORDPRESS_DEBUG=1
|
||||
|
||||
## End WordPress ##
|
||||
|
||||
|
||||
## Database ##
|
||||
WORDPRESS_DB_HOST=db
|
||||
WORDPRESS_DB_USER=exampleuser
|
||||
WORDPRESS_DB_PASSWORD=examplepass
|
||||
WORDPRESS_DB_NAME=exampledb
|
||||
MYSQL_RANDOM_ROOT_PASSWORD=1
|
||||
|
||||
MARIADB_DATABASE=wordpress
|
||||
|
||||
MARIADB_USER=wp
|
||||
MARIADB_PASSWORD=db_wp_password
|
||||
|
||||
MARIADB_ROOT_PASSWORD=db_root_password
|
||||
|
||||
# Comment this if you do not want MariaDB to run upgrade scripts on new versions.
|
||||
MARIADB_AUTO_UPGRADE=1
|
||||
|
||||
## End Database ##
|
||||
|
||||
|
||||
## Performance ##
|
||||
|
||||
# Standard Minimum
|
||||
#WP_CPU=1.00
|
||||
#WP_MEM=2.00G
|
||||
@@ -29,7 +47,9 @@ MYSQL_RANDOM_ROOT_PASSWORD=1
|
||||
#WP_MEM_DB=0.10G
|
||||
|
||||
# Tested Recommended
|
||||
#WP_CPU=1.00
|
||||
#WP_MEM=1.00G
|
||||
#WP_CPU_DB=0.25
|
||||
#WP_MEM_DB=0.25G
|
||||
WP_CPU=1.00
|
||||
WP_MEM=1.00G
|
||||
WP_CPU_DB=0.25
|
||||
WP_MEM_DB=0.25G
|
||||
|
||||
## End Performance ##
|
||||
|
||||
Reference in New Issue
Block a user