From: Guillaume Pellerin Date: Fri, 4 Oct 2019 06:11:13 +0000 (+0200) Subject: Start in DEV mode by default, use 8000 port for every env X-Git-Tag: 1.7.4~5^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=4cd0fb17facac949b7dd7d48d6e42da796791390;p=telemeta.git Start in DEV mode by default, use 8000 port for every env --- diff --git a/README.rst b/README.rst index 5e7d8f7b..2f2155fd 100644 --- a/README.rst +++ b/README.rst @@ -164,15 +164,23 @@ Then clone Telemeta:: Start it up =========== -For a production environment setup, first read / edit `env/prod.env`, then:: +To start the application ONLY for testing or developing purposes:: docker-compose up Then browse the app at http://localhost:8000/ (replacing 'localhost' by the IP given by the docker terminal on OSX or Windows) -To start the application in DEBUG mode:: +Note that the service will automatically be reloaded when any code of the app is modified. + +For a production environment setup, first read / edit `env/prod.env`, then:: + + docker-compose -f docker-compose.yml -f env/prod.yml up + +This will provide the uwsgi port 8000 for which you should setup an exernal Nginx server using uwsgi_pass. - docker-compose -f docker-compose.yml -f env/debug.yml up +You can also use the nginx container like this:: + + docker-compose -f docker-compose.yml -f env/prod.yml -f env/nginx.yml up Be **CAREFULL** in production: @@ -220,15 +228,6 @@ API / Documentation Development =========== -To start the application in a development environment setup, first read / edit `env/debug.env`, then:: - - cd Telemeta - git pull - git checkout dev - docker-compose -f docker-compose.yml -f env/dev.yml up - -Then browse the app at http://localhost:9100/ (replacing 'localhost' by the IP given by the docker terminal on OSX or Windows). Note that the service will automatically be reloaded when any code of the app is modified. - You are welcome to participate to the development by forking the Telemeta project on GitHub_, using it as if it were the original and submitting your changes through a Pull Request on the **dev branch ONLY**. diff --git a/docker-compose.yml b/docker-compose.yml index 7c7e1f33..505d909b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -60,12 +60,14 @@ app: volumes_from: - data env_file: - - env/prod.env - command: /bin/bash bin/app.sh + - env/debug.env + command: /bin/bash bin/app.sh --runserver links: - broker - db - search + ports: + - "8000:8000" worker: image: parisson/telemeta:1.7 diff --git a/env/dev.yml b/env/dev.yml index 5b33658e..89ad56ec 100644 --- a/env/dev.yml +++ b/env/dev.yml @@ -28,7 +28,7 @@ app: - env/debug.env command: /bin/bash bin/app.sh --runserver ports: - - 9100:8000 + - 8000:8000 volumes: - ./lib/TimeSide:/srv/lib/timeside