]> git.parisson.com Git - telemeta.git/commitdiff
fix make_dirs and doc
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 4 Feb 2016 15:22:42 +0000 (16:22 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 4 Feb 2016 15:22:42 +0000 (16:22 +0100)
.gitignore
Dockerfile
README.rst
app/deploy/start_app.sh

index ce93772b0aff770e930c57900e55bbf58b132023..78da6b0ffdfdd545eef067ea67ed445a08a08705 100644 (file)
@@ -10,7 +10,9 @@ eggs
 parts
 bin
 var
-data
+data/media
+data/var
+data/static
 sdist
 develop-eggs
 .installed.cfg
index 202ed87815089fca55163498c1f23e36e418e708..799afa0b376c4469b54fc7e77c480c2ec5180302 100644 (file)
@@ -18,7 +18,7 @@ FROM parisson/timeside:latest
 
 MAINTAINER Guillaume Pellerin <yomguy@parisson.com>, Thomas fillon <thomas@parisson.com>
 
-RUN mkdir /srv/src/
+RUN if [ ! -d /srv/src/ ]; then mkdir /srv/src/; fi
 RUN mkdir /srv/src/telemeta
 COPY . /srv/src/telemeta
 WORKDIR /srv/src/telemeta
@@ -26,7 +26,7 @@ RUN pip install -r requirements.txt
 RUN pip install -r requirements-dev.txt --src /srv/src
 
 ENV PYTHON_EGG_CACHE=/srv/.python-eggs
-RUN mkdir $PYTHON_EGG_CACHE
+RUN if [ ! -d $PYTHON_EGG_CACHE ]; then mkdir $PYTHON_EGG_CACHE; fi
 RUN chown www-data:www-data $PYTHON_EGG_CACHE
 
 WORKDIR /srv/app
index df0ec0c9ce9429cdd93d0c15b9d1b96ab4e672c4..c5231c9470421966b6c7e4e902dfcf643f5912c2 100644 (file)
@@ -112,7 +112,7 @@ password: demo
 Install
 =======
 
-Thanks to Docker, Telemeta is now fully available as a docker image ready to work. The docker based composition bundles some powerfull applications and modern frameworks out-of-the-box like: Python, Numpy, Gstreamer, Django, Celery, MySQL, RabbitMQ, uWSGI, Nginx and many more.. The image includes all the necessary applications, modules and volumes to start your project in a few steps.
+Thanks to Docker, Telemeta is now fully available as a docker image ready to work. The docker based composition bundles some powerfull applications and modern frameworks out-of-the-box like: Python, Numpy, Gstreamer, Django, Celery, Haystack, ElasticSearch, MySQL, RabbitMQ, uWSGI, Nginx and many more...
 
 First install `Git <http://git-scm.com/downloads>`_, `Docker <https://docs.docker.com/installation/>`_ and `docker-compose <https://docs.docker.com/compose/install/>`_, then run these commands in a terminal::
 
@@ -120,7 +120,21 @@ First install `Git <http://git-scm.com/downloads>`_, `Docker <https://docs.docke
     cd Telemeta
     docker-compose up
 
-You can now browse http://localhost:8000 to get the web interface.
+You can now browse http://localhost:8000
+
+
+Restore / backup
+================
+
+To restore a backuped database, put your backup file in data/backup, then in another terminal::
+
+    docker-compose run db /srv/backup/restore_db.sh FILENAME
+
+where FILENAME is the backup filename (can be .sql or .sql.gz)
+
+To backup the database, just run in another terminal::
+
+    docker-compose run db /srv/backup/backup_db.sh
 
 
 API / Documentation
index 2cfb60c12c21781b52ae021c4d043b8495f558ef..fc103355cf91c20bb828b87548cbc4f838a5cd13 100644 (file)
@@ -21,15 +21,18 @@ pip install django-environ redis
 # waiting for other services
 sh $app/deploy/wait.sh
 
+# waiting for available database
+python $app/wait.py
+
 # django init
 python $manage syncdb --noinput
 python $manage migrate --noinput
 python $manage collectstatic --noinput
+python $manage telemeta-create-admin-user
+python $manage telemeta-create-boilerplate
 
 if [ ! -f $app/.init ]; then
  chown -R www-data:www-data $media
- python $manage telemeta-create-admin-user
- python $manage telemeta-create-boilerplate
  python $manage update_index --workers $processes &
  touch $app/.init
 fi