WIP: more work on the docker structure, still not finished with 4_run
1_base: builds a base image, based on Ubuntu 16.10 2_buildpy: builds two images: 2a: an image that can build Python 3.6 2b: an image that contains the built Python 3.6 in /opt/python 3_buildwheels: builds an image to build wheel files, puts them in ../4_run 4_run: the production runtime image, which can't build anything and just runs.
This commit is contained in:
25
docker/4_run/docker-entrypoint.sh
Normal file
25
docker/4_run/docker-entrypoint.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -f /installed ]; then
|
||||
echo "Installing pillar and pillar-sdk"
|
||||
# TODO: curretly doing pip install -e takes a long time, so we symlink
|
||||
# . /data/venv/bin/activate && pip install -e /data/git/pillar
|
||||
ln -s /data/git/pillar/pillar /data/venv/lib/python2.7/site-packages/pillar
|
||||
# . /data/venv/bin/activate && pip install -e /data/git/attract
|
||||
ln -s /data/git/attract/attract /data/venv/lib/python2.7/site-packages/attract
|
||||
# . /data/venv/bin/activate && pip install -e /data/git/flamenco/packages/flamenco
|
||||
ln -s /data/git/flamenco/packages/flamenco/flamenco/ /data/venv/lib/python2.7/site-packages/flamenco
|
||||
# . /data/venv/bin/activate && pip install -e /data/git/pillar-python-sdk
|
||||
ln -s /data/git/pillar-python-sdk/pillarsdk /data/venv/lib/python2.7/site-packages/pillarsdk
|
||||
touch installed
|
||||
fi
|
||||
|
||||
if [ "$DEV" = "true" ]; then
|
||||
echo "Running in development mode"
|
||||
cd /data/git/blender-cloud
|
||||
bash /manage.sh runserver --host='0.0.0.0'
|
||||
else
|
||||
# Run Apache
|
||||
a2enmod rewrite
|
||||
/usr/sbin/apache2ctl -D FOREGROUND
|
||||
fi
|
Reference in New Issue
Block a user