@@ -102,23 +102,19 @@ To build the container image change to the project folder and run:
`docker build -t ldesousa/wsm.rest .`
The resulting image is named `ldesousa/wsm.rest`. To run the image it is
necessary to map the source code folder and port 80 (where nginx listens):
The resulting image is named `ldesousa/wsm.rest`.
To run the image it is necessary to map the right environment variables to connect to the database as well as mount the source code folder and bind port 80 (where nginx listens):
`docker run -dit -v /var/www/wsm.rest:/var/www/wsm.rest --name wsm.rest -p 8081:80 ldesousa/wsm.rest`
Gunicorn can only be started after the source code folder has been mapped. To
do so attach to the running container (named `wsm.rest`):
`docker attach wsm.rest`
And then run the startup script:
`sh /var/www/wsm.rest/configs/startup.sh`
Finally, detach orderly from the running container with the escape sequence: