deploy yobasystems/alpine-php-wordpress under same overlay network "net"
thanks dominic create this wonderful image
everything very modular and beginner friendly
with this base image you can handle 100-150 concurrent user
with pagespeed, varnish, wp supercache (8000-8500) concurrent in a single EC2
working on it
i will publish a optimized image based on this image using pagespeed,varnish,wp supercache
add following (nginx specified) top of the wp-config:
define('FORCE_SSL_ADMIN', true);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
otherwise your site will be loaded without style css and js
PS:
can i just install varnish 5 using:
apk add varnish
can i add:
varnishd -f /etc/varnish/default.vcl -s malloc,64M -a 0.0.0.0:80
to /run.sh
expecting:
varnish,nginx, php-fpm will boot upon container startup based on your infra??
to do:
add wp supercache with pagespeed (working on it)
Thanks
if somebody wanna run this image behind a loadbalancer like traefik 1.7.5 and backed by a swarm cluster: create a overlay network like below:
docker network create \ --driver overlay \ --subnet 10.0.9.0/24 \ --gateway 10.0.9.254 \ net
deploy traefik following:
docker service create -d --name loadbalancer \ --restart-condition any \ --replicas 1 \ --update-delay 2s \ --constraint=node.role==manager \ --publish 80:80 \ --publish 443:443 \ --publish 9090:8080 \ --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \ --mount type=bind,source=/mnt/efs/traefik/certs,target=/etc/traefik/certs \ --mount type=bind,source=/mnt/efs/traefik/traefik.toml,target=/etc/traefik/traefik.toml \ --network net \ traefik:latest \ --docker \ --docker.swarmmode \ --docker.watch \ --web \ --loglevel=DEBUG
traefik.toml
defaultEntryPoints = ["http", "https"]
[entryPoints] [entryPoints.http] address = ":80" [entryPoints.http.redirect] entryPoint = "https" permanent = true [entryPoints.https] address = ":443" [entryPoints.https.tls] [[entryPoints.https.tls.certificates]] certFile = "/etc/traefik/certs/domain.com.crt" keyFile = "/etc/traefik/certs/domain.com.key"
add following (nginx specified) top of the wp-config:
define('FORCE_SSL_ADMIN', true); if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
otherwise your site will be loaded without style css and js
PS: can i just install varnish 5 using: apk add varnish can i add: varnishd -f /etc/varnish/default.vcl -s malloc,64M -a 0.0.0.0:80
to /run.sh
expecting: varnish,nginx, php-fpm will boot upon container startup based on your infra??