Skip to content

Commit

Permalink
Merge pull request #1 from dharmin/master
Browse files Browse the repository at this point in the history
Add ee4 configs
  • Loading branch information
mrrobot47 authored Apr 4, 2018
2 parents 4fb0b21 + a07a781 commit faee698
Show file tree
Hide file tree
Showing 10 changed files with 1,257 additions and 31 deletions.
1,052 changes: 1,052 additions & 0 deletions ee4-config/redis/redis.conf

Large diffs are not rendered by default.

37 changes: 10 additions & 27 deletions ee4-config/wp/config/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -1,36 +1,19 @@
server {
server_name localhost;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /var/www/html;

root /var/www/html;
index index.php;
server_name site1.test;

if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
index index.php index.html index.htm;

location / {
try_files $uri $uri/ /index.php?$args;
}

location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# include common/redis-php7.conf;

location = /robots.txt {
return 200 'User-agent: *
Disallow: /';
access_log off;
log_not_found off;
}
include common/php7.conf;
include common/wpcommon-php7.conf;
include common/locations-php7.conf;

client_max_body_size 100m;
include /etc/nginx/sites-enabled/*;
client_max_body_size 100m;
}
2 changes: 1 addition & 1 deletion ee4-config/wp/docker-compose-traefik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
- site-network

nginx:
image: nginx:latest
image: dharmin/nginx:latest
depends_on:
- php
restart: always
Expand Down
6 changes: 3 additions & 3 deletions ee4-config/wp/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
- site-network

php:
image: rtcamp/wordpress
image: wordpress/rtcamp
depends_on:
- db
restart: always
Expand All @@ -48,7 +48,7 @@ services:
- site-network

nginx:
image: nginx:latest
image: dharmin/nginx:latest
depends_on:
- php
restart: always
Expand All @@ -64,4 +64,4 @@ services:
networks:
site-network:
external:
name: ${VIRTUAL_HOST}
name: ${VIRTUAL_HOST}
23 changes: 23 additions & 0 deletions ee4-config/wpredis/config/.env.deployer
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
DB_NAME=database_name
DB_USER=database_user
DB_PASSWORD=database_password

# Optional variables
DB_HOST=mysql
# DB_PREFIX=wp_

WP_ENV=development
WP_HOME=http://example.com
WP_SITEURL=${WP_HOME}

# Generate your keys here: https://roots.io/salts.html
AUTH_KEY='generateme'
SECURE_AUTH_KEY='generateme'
LOGGED_IN_KEY='generateme'
NONCE_KEY='generateme'
AUTH_SALT='generateme'
SECURE_AUTH_SALT='generateme'
LOGGED_IN_SALT='generateme'
NONCE_SALT='generateme'
WP_CACHE_KEY_SALT='example.com:' #trailing `:` is important

8 changes: 8 additions & 0 deletions ee4-config/wpredis/config/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MYSQL_ROOT_PASSWORD=password
MYSQL_DATABASE=wordpress
MYSQL_USER=wordpress
MYSQL_PASSWORD=password

WORDPRESS_DB_HOST=db
VIRTUAL_HOST={V_HOST}
VIRTUAL_HOST_EMAIL=[email protected]
18 changes: 18 additions & 0 deletions ee4-config/wpredis/config/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
server {
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

root /var/www/html;

server_name site1.test;

index index.php index.html index.htm;


include common/redis-php7.conf;

include common/wpcommon-php7.conf;
include common/locations-php7.conf;

client_max_body_size 100m;
}
7 changes: 7 additions & 0 deletions ee4-config/wpredis/config/php-fpm/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Custom PHP settings

upload_max_filesize = 100M
post_max_size = 100M

[mail function]
sendmail_path = /usr/sbin/sendmail -S mail:1025
68 changes: 68 additions & 0 deletions ee4-config/wpredis/docker-compose-traefik.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: '3'

services:
mail:
image: mailhog/mailhog
restart: always
command: ["-invite-jim=false"]
labels:
- traefik.enable=false
environment:
- VIRTUAL_HOST=mail.${VIRTUAL_HOST}
- VIRTUAL_PORT=8025
networks:
- site-network

db:
image: mysql:latest
restart: always
volumes:
- "./app/db:/var/lib/mysql"
labels:
- traefik.enable=false
environment:
- MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
networks:
- site-network

php:
image: rtcamp/wordpress
depends_on:
- db
restart: always
labels:
- traefik.enable=false
volumes:
- "./app/src:/var/www/html"
- "./config/php-fpm/php.ini:/usr/local/etc/php/php.ini"
environment:
- WORDPRESS_DB_HOST
- WORDPRESS_DB_USER=${MYSQL_USER}
- WORDPRESS_DB_PASSWORD=${MYSQL_PASSWORD}
networks:
- site-network

nginx:
image: dharmin/nginx:latest
depends_on:
- php
restart: always
environment:
- VIRTUAL_HOST
labels:
- "traefik.backend=${VIRTUAL_HOST}"
- "traefik.frontend.rule=HostRegexp:${VIRTUAL_HOST},{subdomain:[-a-z0-9]+}.${VIRTUAL_HOST}"
volumes:
- "./app/src:/var/www/html"
- "./config/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./logs/nginx:/var/log/nginx"
networks:
- site-network

networks:
site-network:
external:
name: ${VIRTUAL_HOST}
67 changes: 67 additions & 0 deletions ee4-config/wpredis/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
version: '3'

services:
mail:
image: mailhog/mailhog
restart: always
command: ["-invite-jim=false"]
environment:
- VIRTUAL_HOST=mail.${VIRTUAL_HOST}
- VIRTUAL_PORT=8025
networks:
- site-network

db:
image: mysql:latest
restart: always
volumes:
- "./app/db:/var/lib/mysql"
environment:
- MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
networks:
- site-network

phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
environment:
- VIRTUAL_HOST=pma.${VIRTUAL_HOST}
networks:
- site-network

php:
image: wordpress/rtcamp
depends_on:
- db
restart: always
volumes:
- "./app/src:/var/www/html"
- "./config/php-fpm/php.ini:/usr/local/etc/php/php.ini"
environment:
- WORDPRESS_DB_HOST
- WORDPRESS_DB_USER=${MYSQL_USER}
- WORDPRESS_DB_PASSWORD=${MYSQL_PASSWORD}
networks:
- site-network

nginx:
image: dharmin/nginx:latest
depends_on:
- php
restart: always
environment:
- VIRTUAL_HOST
volumes:
- "./app/src:/var/www/html"
- "./config/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./logs/nginx:/var/log/nginx"
networks:
- site-network

networks:
site-network:
external:
name: ${VIRTUAL_HOST}

0 comments on commit faee698

Please sign in to comment.