Commit 51c973c6 authored by Luís de Sousa's avatar Luís de Sousa
Browse files

Deployment notes in README.

parent f3ed19af
World Soil Museum - REST API
Some content is protected and paid, therefore distibution is not allowe
# Copyright
(c) ISRIC - Worlds Soil Information
# Licence
Some content is protected and paid, therefore distibution is not allowed.
# Deployment
This API is to be deployed within a docker container. The code resides in the
host system, together with the monoliths images to be served. These images
must be acessible in a folder named `monoliths` at the folder root (same level
as this file). This code folder is then mapped into the container at startup.
The Dockerfile present in this project sets up the API with Gunicorn and nginx.
To build the container image change to the project folder and run:
`docker build -t ldesousa/ .`
The resulting image is named `ldesousa/`. To run the image it is
necessary to map the source code folder and port 80 (where nginx listens):
`docker run -dit -v /var/www/ --name -p 8081:80 ldesousa/`
Gunicorn can only be started after the source code folder has been mapped. To
do so attach to the running container (named ``):
`docker attach`
And then run the startup script:
`sh /var/www/`
Finally, detach orderly from the running container with the escape sequence:
`Ctrl+P Ctrl+Q`
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment