From c98b0e701449f5a86a36f57f0095e886e565d6a2 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 26 Sep 2018 14:14:11 +0200 Subject: [PATCH] update readme III.2.* with DNS properties and deployment --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2cf32b8..28d9608 100644 --- a/README.md +++ b/README.md @@ -53,14 +53,35 @@ MariaDB will have its whole data folder (_i.e. `/var/lib/mysql`_) on the host in Also logs will be mounted the same way in order for developers to easily check these out when needed (_e.g. `virtual/var/log/apache2/access.log`_). Also, note that even if the container is removed, the logs will remain. + + ###### d) Development folder The development folder (_i.e. the actual code to test_) is located in the folder [virtual/vhost](./virtual/vhost). In a real-world use of this configuration, I would clone a git repository into it in order for my docker configuration and my actual code not to mix together ; we could then use _git submodules_ for version stability among the 2 repositories. - #### 2. Network sharing -The whole system will only expose its port `8080` ; we are not using the default HTTP port not to break a possible web server on the host. Containers between them will be connected through the default overlay network which is unreachable from the host. + + +###### a) Ports and network + +The whole system will only expose its port `8080` ; + +> We do not use the default HTTP port not to break a possible web server on the host. + +Containers between them will be connected through the `privnet` network which is unreachable from the host ; except for the port 8080. + + + +###### b) DNS + +The `nginx` container is configured to only accept the host `mydomain.com`, it corresponds to the DNS record chosen for the production server. This domain must be added into the `/etc/hosts` file of each developer in order for them to access the web server at `mydomain.com:8080`. + + + +###### c) Production deployment + +If the project is pushed into a production server, if you have no other program occupying the port `80`, you can just replace the port binding `8080:80` in `docker-compose.yml`. If it is already taken by apache/nginx, you will have to create an entry in your web server to forward your requests from your address (_i.e. domain.com_) to the specific port 8080 (_c.f. [reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy)_).