Skip to content
This repository was archived by the owner on Aug 10, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
wordpress
data
app
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most frameworks already uses app dir for specific codes. e.g. https://laravel.com/docs/5.5/structure

If we use this then users will have to cd ..../app/app/.....

So can we think of an alternative? e.g. web, source

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe keep wordpress for now 😃

logs
test
test*
codeception.yml
composer.json
logo.jpg
vendor
File renamed without changes.
4 changes: 2 additions & 2 deletions multiple-sites/.env.example → config/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ MYSQL_DATABASE=wordpress
MYSQL_USER=wordpress
MYSQL_PASSWORD=password

WORDPRESS_DB_USER=wordpress
WORDPRESS_DB_PASSWORD=password
WORDPRESS_DB_HOST=db
VIRTUAL_HOST=site1.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ server {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
}

location / {
try_files $uri $uri/ /index.php?$args;
Expand All @@ -24,6 +24,13 @@ server {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location = /robots.txt {
return 200 'User-agent: *
Disallow: /';
access_log off;
log_not_found off;
}

client_max_body_size 100m;
include includes/wpsubdir.conf;
include /etc/nginx/sites-enabled/*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need this? Every app will be a single nginx? Or is this related to front-end proxy?

}
21 changes: 11 additions & 10 deletions multiple-sites/docker-compose.yml → docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ services:
restart: always
command: ["-invite-jim=false"]
environment:
- VIRTUAL_HOST=mail.site1.test
- VIRTUAL_HOST=mail.${VIRTUAL_HOST}
- VIRTUAL_PORT=8025
networks:
- site-network

mysql:
db:
image: mysql:latest
restart: always
volumes:
- "./data/db:/var/lib/mysql"
- "./app/db:/var/lib/mysql"
environment:
- MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE
Expand All @@ -27,14 +27,15 @@ services:
php:
image: rtcamp/wordpress
depends_on:
- mysql
- db
restart: always
volumes:
- "./wordpress:/var/www/html"
- "./app/src:/var/www/html"
- "./config/php-fpm/php.ini:/usr/local/etc/php/php.ini"
environment:
- WORDPRESS_DB_USER
- WORDPRESS_DB_PASSWORD
- WORDPRESS_DB_HOST
- WORDPRESS_DB_USER=${MYSQL_USER}
- WORDPRESS_DB_PASSWORD=${MYSQL_PASSWORD}
networks:
- site-network

Expand All @@ -44,9 +45,9 @@ services:
- php
restart: always
environment:
- VIRTUAL_HOST=site1.test
- VIRTUAL_HOST
volumes:
- "./wordpress:/var/www/html"
- "./app/src:/var/www/html"
- "./config/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./logs/nginx:/var/log/nginx"
networks:
Expand All @@ -55,4 +56,4 @@ services:
networks:
site-network:
external:
name: custom-network
name: ${VIRTUAL_HOST}
50 changes: 0 additions & 50 deletions multiple-sites/README.md

This file was deleted.

31 changes: 0 additions & 31 deletions multiple-sites/config/nginx/default.conf

This file was deleted.

83 changes: 0 additions & 83 deletions multiple-sites/setup.sh

This file was deleted.

16 changes: 0 additions & 16 deletions single-site/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions single-site/config/nginx/default.conf

This file was deleted.

4 changes: 0 additions & 4 deletions single-site/config/php-fpm/php.ini

This file was deleted.

39 changes: 0 additions & 39 deletions single-site/docker-compose.yml

This file was deleted.

Loading