Commit a9d38e79 authored by david's avatar david
Browse files

Fixes for docker config.

parent bce5b55e
......@@ -78,9 +78,8 @@ python
.noseids
# Configurations
config/engine.ini
config/docker/engine.ini
config/engine.docker.ini
env.list
# Socket
src/liquidsoap/engine.sock
\ No newline at end of file
socket/engine.sock
\ No newline at end of file
......@@ -16,6 +16,7 @@ RUN mkdir -p /srv/src
RUN mkdir -p /srv/config
RUN /usr/local/bin/python -m pip install --upgrade pip
COPY src /srv/src
COPY config/sample-docker.engine.ini /srv/config/engine.ini
COPY requirements.txt /srv
COPY contrib/postgresql-requirements.txt /srv
COPY meta.py /srv
......
......@@ -80,11 +80,11 @@ if [[ $docker == "true" ]]; then
if [[ $mode == "engine" ]]; then
if [[ -z "${AURA_ENGINE_CONFIG_PATH}" ]]; then
AURA_ENGINE_CONFIG_PATH="$BASE_DIR/config/engine.docker.ini"
AURA_ENGINE_CONFIG_PATH=$(readlink -f "${BASE_DIR}/config/engine.docker.ini")
fi
if [[ -z "${AURA_ENGINE_SOCKET_DIR}" ]]; then
AURA_ENGINE_SOCKET_DIR="$BASE_DIR/../engine-core/socket"
AURA_ENGINE_SOCKET_DIR=$(readlink -f "${BASE_DIR}/../engine-core-quickstart/socket")
fi
if [[ -z "${AURA_ENGINE_CONTROL_CHANNEL}" ]]; then
......@@ -92,20 +92,26 @@ if [[ $docker == "true" ]]; then
fi
if [[ -z "${AURA_ENGINE_AUDIO_SOURCE_DIR}" ]]; then
AURA_ENGINE_AUDIO_SOURCE_DIR="$BASE_DIR/audio/source"
AURA_ENGINE_AUDIO_SOURCE_DIR=$(readlink -f "${BASE_DIR}/audio/source")
fi
if [[ -z "${AURA_ENGINE_AUDIO_PLAYLIST_DIR}" ]]; then
AURA_ENGINE_AUDIO_PLAYLIST_DIR="$BASE_DIR/audio/playlist"
AURA_ENGINE_AUDIO_PLAYLIST_DIR=$(readlink -f "${BASE_DIR}/audio/playlist")
fi
echo AURA_ENGINE_CONFIG_PATH="$AURA_ENGINE_CONFIG_PATH"
echo AURA_ENGINE_SOCKET_DIR="$AURA_ENGINE_SOCKET_DIR"
echo AURA_ENGINE_CONTROL_CHANNEL="$AURA_ENGINE_CONTROL_CHANNEL"
echo AURA_ENGINE_AUDIO_SOURCE_DIR="$AURA_ENGINE_AUDIO_SOURCE_DIR"
echo AURA_ENGINE_AUDIO_PLAYLIST_DIR="$AURA_ENGINE_AUDIO_PLAYLIST_DIR"
exec sudo docker run \
--network="host" \
--name aura-engine \
--rm \
-u $UID:$GID \
-p $AURA_ENGINE_CONTROL_CHANNEL:1337/tcp \
-v "$AURA_ENGINE_CONFIG_PATH":"/srv/config/engine.ini":ro \
-p "$AURA_ENGINE_CONTROL_CHANNEL":1337/tcp \
-v "$AURA_ENGINE_CONFIG_PATH":"/srv/config/engine.ini" \
-v "$AURA_ENGINE_SOCKET_DIR":"/srv/socket" \
-v "$AURA_ENGINE_AUDIO_SOURCE_DIR":"/var/audio/source":ro \
-v "$AURA_ENGINE_AUDIO_PLAYLIST_DIR":"/var/audio/playlist" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment