Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Bird committed May 9, 2018
1 parent dd3607b commit 82eb511
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,53 @@ php bin/config-update.php --help
php bin/config-update.php --usage
```

## Docker environment
A docker environment is provided using docker-compose.
* [docker-compose.yml](/docker/compose/clientcal/docker-compose.yml)

### Docker environment requirements
- docker version 18.03 or newer
- docker-compose version 1.19 or newer

### Docker-compose for development and testing
The default configuration is suitable for local development and testing.

**basic usage**
```
cd docker/compose/clientcal
docker-compose build
docker-compose up
```

**what occurs during 'up' or 'start'**
* non-ephemerial MySQL data is mounted on the host system
* the database is initialized if starting the first time using the latest schema dump according to [db-schema.json](/app/data/schema-sql/db-schema.json)
* php-fpm starts, and is available to nginx
* nginx starts, and the ClientCal application is available on the local system
* Default Entrypoint URL: http://localhost:8080
* PHP errors are logged to the terminal as they occur (as long as the 'php-fpm' container is attached to your terminal, i.e. `docker-compose up`)
* nginx errors are logged to the terminal as they occur (as long as the 'nginx' container is attached to your terminal, i.e. `docker-compose up`)

### Docker-compose for public deployment
The docker-compose configuration included with this project IS NOT suitable for public deployment of ClientCal as provided. It could be made suitable to deploy publicly only if modifications are made to provide provide SSL.

Examples of the easier ways this could be done are as follows:
* modifying the provided nginx configuration (such as with a volume mount) to use SSL
* deploying a separate public facing HTTP server with SSL that is configured to be a reverse proxy to the clientcal docker network port 8080
* deploying a separate public facing HTTP server with SSL that is configured to use CGI over the clientcal docker network port 9000

## Docker images
* [php](/docker/image/php/Dockerfile)
* [mariadb](/docker/image/mariadb/Dockerfile)

### PHP docker image
The "php" docker image contains all dependencies for running the ClientCal web application.
It is suitable for stand-alone use (i.e. `docker run ...`) or in conjunction with docker-compose (such as configured in the "docker environment" included in this project). It uses [alpine linux](https://hub.docker.com/_/alpine/) and the [PHP Repositories for Alpine - by CODECASTS](https://github.com/codecasts/php-alpine) for php related packages.

### MariaDB docker image
The "mariadb" docker image provides a MariaDB service suitable for use witht he "docker-compose environment" included in this project. It uses the [official mariadb image](https://hub.docker.com/_/mariadb/) with some user permissions tweaks to better facilitate executing seed scripts and saving non-ephemerial data to the host.


## Legal
ClientCal is distributed under the terms of the MIT license or the GPLv3 license.

Expand Down

0 comments on commit 82eb511

Please sign in to comment.