port=8000
processes=8
threads=8
-autoreload=3
uid='www-data'
gid='www-data'
# waiting for other network services
sh $app/scripts/wait.sh
python $manage wait-for-db
-python $manage migrate --noinput
-python $manage bower_install -- --allow-root
+
+if [ ! -f .init ]; then
+ python $manage migrate --noinput
+ python $manage bower_install -- --allow-root
+ touch .init
+fi
# telemeta setup
python $manage telemeta-create-admin-user
# app start
uwsgi --socket :$port --wsgi-file $wsgi --chdir $app --master \
- --processes $processes --threads $threads \
- --uid $uid --gid $gid --logto $log --touch-reload $wsgi
-
+ --processes $processes --threads $threads \
+ --uid $uid --gid $gid
fi
image: elasticsearch:1
app:
- image: parisson/telemeta:latest
+ image: parisson/telemeta:1.6.x
volumes:
- ./app:/srv/app
- ./telemeta:/srv/src/telemeta/telemeta
- search
worker:
- image: parisson/telemeta:latest
+ image: parisson/telemeta:1.6.x
volumes_from:
- app
- data
app:
- image: image: parisson/telemeta:latest-dev
+ image: parisson/telemeta:latest
env_file:
- env/debug.env
command: /bin/bash scripts/app.sh --runserver
- 9000:8000
worker:
- image: image: parisson/telemeta:latest-dev
+ image: parisson/telemeta:latest
env_file:
- env/debug.env
graphers_access = (user.is_staff
or user.is_superuser
or user.has_perm('telemeta.can_run_analysis'))
-
for grapher in self.graphers:
if (graphers_access or grapher.id() in self.public_graphers):
- continue
- if grapher.id() == self.default_grapher_id:
- graphers.insert(0, {'name': grapher.name(), 'id': grapher.id()})
- elif not hasattr(grapher, '_staging'):
- graphers.append({'name': grapher.name(), 'id': grapher.id()})
- elif not grapher._staging:
- graphers.append({'name': grapher.name(), 'id': grapher.id()})
+ if grapher.id() == self.default_grapher_id:
+ graphers.insert(0, {'name': grapher.name(), 'id': grapher.id()})
+ elif not hasattr(grapher, '_staging'):
+ graphers.append({'name': grapher.name(), 'id': grapher.id()})
+ elif not grapher._staging:
+ graphers.append({'name': grapher.name(), 'id': grapher.id()})
return graphers
def get_grapher(self, id):