diff --git a/.gitignore b/.gitignore index 6cb3be02904fa80bd49e9f6c99135abfb1e7d012..4c72169115408ad41e98232601df575d39fc6ca4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ env.list audio python __pycache__ -config/engine.docker.ini +config/docker.engine.ini diff --git a/README.md b/README.md index 5980561fa246cf2cb99e3ce5350b040464b5c8e7..bff6e699b6eed3e3eac3aff5309d7fe5b39a556f 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,12 @@ For production we recommend running Engine using Docker Compose. If you want to ## Using Docker -If you only want to run the single Engine Docker container, you can do this in a few, simple steps. Before getting started copy the default configuration file to `config/engine.docker.ini`: +If you only want to run a single Engine Docker container, you can do this in a few, simple steps. + +Before getting started copy the default configuration file to `config/engine.docker.ini`: ```shell - cp config/sample-docker.engine.ini config/engine.docker.ini + cp config/sample-docker.engine.ini config/docker.engine.ini ``` You'll need update a few settings: @@ -95,13 +97,17 @@ You'll need update a few settings: - The app secret `api_tank_secret` for connecting to [AURA Tank](https://gitlab.servus.at/aura/tank) - Also check the `ENV` variables defined in the `run.sh` script. -At the moment production deployment using Docker and Docker Compose is [*work in progress*](https://gitlab.servus.at/aura/meta/-/issues/56). For now, starting Engine in Docker requires you to do a local build first: +At the moment production deployment using Docker and Docker Compose is [*work in progress*](https://gitlab.servus.at/aura/meta/-/issues/56). + +If you would like to run the local codebase, starting Engine in Docker requires you to do a build first: ```shell ./run.sh docker:build ``` -After your build has finished start the Engine with: +After your build has finished start the Engine with following command. + +If no build is available it pulls the latest image from [Docker Hub](https://hub.docker.com/r/autoradio/engine). ```shell ./run.sh docker:dev diff --git a/run.sh b/run.sh index 39980cd87551b12deab235e84e37610f215dc0e0..b5323c6fee99f7acdec066da17caeff68eeb973a 100755 --- a/run.sh +++ b/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -mode="engine" +mode="dev" docker="false" # @@ -13,6 +13,7 @@ docker="false" # - recreate-database # - docker:dev +# - docker:prod # - docker:build # - docker:push # @@ -77,12 +78,12 @@ if [[ $docker == "true" ]]; then BASE_DIR=$(readlink -f .) echo "Absolute base dir: " $BASE_DIR - ### Runs Engine Docker Container ### + ### Runs Engine Docker Container (Local build for development, if n/a pull from Docker Hub) ### if [[ $mode == "dev" ]]; then if [[ -z "${AURA_ENGINE_CONFIG_PATH}" ]]; then - AURA_ENGINE_CONFIG_PATH=$(readlink -f "${BASE_DIR}/config/engine.docker.ini") + AURA_ENGINE_CONFIG_PATH=$(readlink -f "${BASE_DIR}/config/docker.engine.ini") fi if [[ -z "${AURA_ENGINE_SOCKET_DIR}" ]]; then