From: Guillaume Pellerin Date: Thu, 3 Mar 2016 11:02:37 +0000 (+0100) Subject: update dev config and setup X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=779beaed5c96afdcc7b7daf354d69c7bf4de53d5;p=mezzo.git update dev config and setup --- diff --git a/README.rst b/README.rst index 6a8fe2bd..ee49416a 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ This is the new template for the Manifeste festival website at IRCAM. It is base Install -========= +======= For easier development and production workflow, it has been dockerized including Django, Mezzanine, MariaDB and Nginx. @@ -20,20 +20,44 @@ Then run these commands:: cd Manifeste docker-compose up db -The last command is needed to init the database. Press CTRL-C to exit, then fire up the whole composition:: +Press CTRL-C to exit (the last command is needed to init the database). + + +Start +===== + +For a production environment setup:: docker-compose up -Restore the backuped database, in another terminal (or a Docker Quickstart Terminal):: +Then browse the app at http://localhost:8010/ (replacing 'localhost' by the IP given by the docker terminal on OSX and Windows) + +For a development environment setup:: + + docker-compose -f docker-compose.yml -f conf/dev.yml up + +Then browse the app at http://localhost:9010/ (replacing 'localhost' by the IP given by the docker terminal on OSX and Windows) + + +Backup / Restore +================ + +To backup the database, in another terminal (or a Docker Quickstart Terminal):: + + cd Manifeste + scripts/restore.sh + +giving your user password if asked... + +To restore the backuped database, in another terminal (or a Docker Quickstart Terminal):: cd Manifeste scripts/restore.sh -Give you user password if asked. -You should be able to browse the app at http://localhost:8010/ (replacing 'localhost' by the IP given by the docker terminal on OSX and Windows) +If app is broken after a restore script, restart the machine with:: + + docker-compose restart -If app is broken after a restore script : -`docker-compose restart` to restart the machine. Work with gulp ================== diff --git a/app/deploy/start_app.sh b/app/deploy/start_app.sh index f13f27af..664d9bfe 100644 --- a/app/deploy/start_app.sh +++ b/app/deploy/start_app.sh @@ -38,7 +38,7 @@ python $manage create-admin-user # app start if [ $1 = "--runserver" ] then - python $manage runserver 0.0.0.0:9010 + python $manage runserver 0.0.0.0:8000 else # static files auto update watchmedo shell-command --patterns="$patterns" --recursive \ diff --git a/conf/dev.yml b/conf/dev.yml index a4d25c57..72e814b5 100644 --- a/conf/dev.yml +++ b/conf/dev.yml @@ -21,3 +21,5 @@ app: command: /bin/sh deploy/start_app.sh --runserver + ports: + - "9010:8000" diff --git a/docker-compose.yml b/docker-compose.yml index e8f28dbb..c573b8c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,8 +52,6 @@ db: app: build: . command: /bin/sh deploy/start_app.sh - ports: - - "9010:9010" volumes: - ./app/:/srv/app volumes_from: