Skip to content
Snippets Groups Projects
Commit fc181555 authored by David Trattnig's avatar David Trattnig
Browse files

Build docker from run script.

parent 822406df
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
exec sudo docker build -t aura/engine .
...@@ -2,18 +2,39 @@ ...@@ -2,18 +2,39 @@
mode="engine" mode="engine"
docker="false" docker="false"
#
# Run Script for AURA Engine
#
# Call with one of these parameters:
#
# - engine
# - core
# - lqs
# - api-dev
# - api
#
# - docker:engine
# - docker:core
# - docker:lqs
# - docker:build
# - docker:api
#
if [[ $* =~ ^(engine|core|lqs|api-dev|api)$ ]]; then if [[ $* =~ ^(engine|core|lqs|api-dev|api)$ ]]; then
mode=$1 mode=$1
fi fi
if [[ $* =~ ^(docker)$ ]]; then if [[ "$1" == *"docker:"* ]]; then
docker="true" docker="true"
mode=${1#*:}
fi fi
echo "[ Run mode=$mode ]" echo "[ Run mode=$mode ]"
echo "[ Docker=$docker ]" echo "[ Docker=$docker ]"
# +++ DEFAULT COMMANDS +++ # # +++ DEFAULT COMMANDS +++ #
if [[ $docker == "false" ]]; then if [[ $docker == "false" ]]; then
...@@ -115,4 +136,11 @@ if [[ $docker == "true" ]]; then ...@@ -115,4 +136,11 @@ if [[ $docker == "true" ]]; then
--device aura/engine /bin/bash \ --device aura/engine /bin/bash \
-c "gunicorn -c configuration/gunicorn.conf.py engine-api:app" -c "gunicorn -c configuration/gunicorn.conf.py engine-api:app"
fi fi
### Create Docker Image from local project ###
if [[ $mode == "build" ]]; then
exec sudo docker build -t aura/engine .
fi
fi fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment