Comments (5)
redis:
restart: always
image: redis:latest
volumes:
- ./sites/wp1/redis:/data
from 444noresponse.
wp-fpm:
tty: true
stdin_open: true
image: emcniece/wordpress:latest
volumes:
- wproot:/var/www/html
environment:
WORDPRESS_DB_HOST: mysql
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WPFPM_WP_REDIS_HOST: redis
WPFPM_RT_WP_NGINX_HELPER_CACHE_PATH: "/tmp/cache"
#WP_PLUGINS: "nginx-helper redis-cache"
#ENABLE_HYPERDB: "true"
#ENABLE_CRON: "true"
#CRON_CMD: "*/1 * * * * /usr/bin/curl -silent -A 'Mozilla' 'https://google.com' > /dev/null 2>&1"
mysql:
image: mariadb
command: mysqld --innodb-buffer-pool-size=20M
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: wordpress
MYSQL_DATABASE: wordpress
MYSQL_PASSWORD: wordpress
redis:
image: redis:3-alpine
from 444noresponse.
redis:
image: redis:6
restart: always
logging:
options:
max-size: "10m"
max-file: "3"
ports:
- "6379:6379"
networks:
- backend
# launch Redis in cache mode with :
# - max memory up to 50% of your RAM if needed (--maxmemory 512mb)
# - deleting oldest data when max memory is reached (--maxmemory-policy allkeys-lru)
entrypoint: redis-server --maxmemory 512mb -maxmemory-policy allkeys-lru
from 444noresponse.
define( 'WP_REDIS_HOST', 'redis-cluster' );
define( 'WP_CACHE', true );
// define( 'WP_REDIS_CLIENT', 'pecl' );
define( 'WP_REDIS_PASSWORD', 'SOMEPASSWORD' );
define( 'WP_REDIS_DATABASE', '0' );
define( 'WP_CACHE_KEY_SALT', 'SOMESALTHERE' );
define( 'WP_REDIS_SELECTIVE_FLUSH', true );
define( 'WP_REDIS_DISABLE_BANNERS', true );
from 444noresponse.
Add the following in the db-config.php file in the ini directory of the w3-total-cache plugin directory
//
// redis config cache
//
define( 'W3TC_CONFIG_CACHE_ENGINE', 'redis');
define( 'W3TC_CONFIG_CACHE_REDIS_SERVERS', 'redis_hostname::6379' );
// optional redis settings
define( 'W3TC_CONFIG_CACHE_REDIS_PERSISTENT', true );
define( 'W3TC_CONFIG_CACHE_REDIS_DBID', 0 );
define( 'W3TC_CONFIG_CACHE_REDIS_PASSWORD', '' );
Enable the following in the Performance menu in the WP Admin
General > Page Cache > Redis -- This provides the most bang for the buck
General > Database Cache > Redis
General > Object Cache > Redis
from 444noresponse.
Related Issues (19)
- Update nginx.conf
- Make cron job for SSL cert renewal
- Check for latest images version
- wp-cli HOT 1
- Setup EC2 to init Docker
- setup CloudFormation stack HOT 2
- Add phpmyadmin HOT 3
- Somehow make K8's cluster
- use subdomains for WP and PMA
- WP FPM
- Pull out environment variables to .env
- Add Portainer service to docker-compose HOT 1
- Github actions workflows
- try traefik HOT 1
- add to db container
- spot insttance in CF HOT 3
- nginx max size HOT 2
- bak mysql
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 444noresponse.