From 08a011d4920da9fe17a72cf8314685b347115275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Thu, 10 May 2018 16:52:54 +0200 Subject: [PATCH] Add README --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..454ff63 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# ladylilia.com + +## Project structure + +* `api` - Flask application implementing RESTful API for querying/manipulating database of quotes +* `cms` - Grav CMS (Content Management System) +* `ng-app` - Angular application for browsing quotes +* `nginx` - Configuration of NGINX web server + +## Deployment + +This project consists of 3 container images (`api`, `cms` and `nginx`), that depend on each other - they need to run simultaneously and share certain data between themselves. + +Easiest way how to manage that is using `docker-compose`. Just copy `docker-compose.yaml.example` into `docker-compose.yaml`, make necessary adjustments and fire it all up with: + +```BASH +docker-compose up -d +``` + +## API key generation + +API key is needed for `POST`, `PUT` and `DELETE` API methods. + +If the `api` container is running, the key can be generated like this: + +```BASH +docker exec $API_CONTAINER_NAME python generate_api_key.py $USERNAME $EXPIRATION_TIME_IN_SECONDS +```