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

Chore(Docker): Consolidate with Engine Docker

parent a7f5cdf2
No related branches found
No related tags found
No related merge requests found
Pipeline #2190 passed
...@@ -14,15 +14,13 @@ RUN apt update --allow-releaseinfo-change && \ ...@@ -14,15 +14,13 @@ RUN apt update --allow-releaseinfo-change && \
# Setup Engine # Setup Engine
ENV TZ=Europe/Vienna ENV TZ=Europe/Vienna
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN mkdir -p /srv/src RUN mkdir -p /srv/src /srv/tests /srv/config srv/logs srv/socket
RUN mkdir -p /srv/tests
RUN mkdir -p /srv/config
COPY src /srv/src COPY src /srv/src
COPY tests /srv/tests COPY tests /srv/tests
COPY config/sample.engine-core.docker.ini /srv/config/engine-core.ini COPY config/sample.engine-core.docker.ini /etc/aura/engine-core.ini
COPY Makefile /srv/Makefile COPY Makefile /srv/Makefile
COPY VERSION /srv/VERSION COPY VERSION /srv/VERSION
VOLUME ["/srv/socket", "/srv/logs", "/srv/audio/source", "/srv/audio/playlist", "/srv/audio/fallback"]
#RUN chown -R liquidsoap:liquidsoap /srv #RUN chown -R liquidsoap:liquidsoap /srv
WORKDIR /srv WORKDIR /srv
......
-include build/base.Makefile -include build/base.Makefile
-include build/docker.Makefile -include build/docker.Makefile
.PHONY: help
help: help::
@echo "$(APP_NAME) targets:" @echo "$(APP_NAME) targets:"
@echo " init.dev - init development environment" @echo " init.dev - init development environment"
@echo " lint - verify code style" @echo " lint - verify code style"
...@@ -17,12 +17,13 @@ help: ...@@ -17,12 +17,13 @@ help:
# Settings # Settings
AURA_ENGINE_CORE_SOCKET := "aura_engine_socket"
AURA_ENGINE_CORE_CONFIG := ${CURDIR}/config/engine-core.docker.ini AURA_ENGINE_CORE_CONFIG := ${CURDIR}/config/engine-core.docker.ini
AURA_ENGINE_CORE_SOCKET := ${CURDIR}/socket AURA_AUDIO_STORE_SOURCE := ${CURDIR}/audio/source
AURA_AUDIO_STORE := ${CURDIR}/audio AURA_AUDIO_STORE_PLAYLIST := ${CURDIR}/audio/playlist
AURA_AUDIO_STORE_SOURCE := ${AURA_AUDIO_STORE}/source AURA_AUDIO_STORE_FALLBACK := ${CURDIR}/audio/fallback
AURA_AUDIO_STORE_FALLBACK := ${AURA_AUDIO_STORE}/fallback AURA_LOGS := ${CURDIR}/logs
AURA_AUDIO_STORE_PLAYLIST := ${AURA_AUDIO_STORE}/playlist TIMEZONE := "Europe/Vienna"
DOCKER_RUN = @docker run \ DOCKER_RUN = @docker run \
--name $(APP_NAME) \ --name $(APP_NAME) \
...@@ -30,8 +31,9 @@ DOCKER_RUN = @docker run \ ...@@ -30,8 +31,9 @@ DOCKER_RUN = @docker run \
--mount type=tmpfs,destination=/tmp \ --mount type=tmpfs,destination=/tmp \
--device /dev/snd \ --device /dev/snd \
--group-add audio \ --group-add audio \
-v "$(AURA_ENGINE_CORE_CONFIG)":"/srv/config/engine-core.ini":ro \ -e TZ=$(TIMEZONE) \
-v "$(AURA_ENGINE_CORE_SOCKET)":"/srv/socket" \ -v "$(AURA_ENGINE_CORE_SOCKET)":"/srv/socket" \
-v "$(AURA_ENGINE_CORE_CONFIG)":"/etc/aura/engine-core.ini":ro \
-v "$(AURA_AUDIO_STORE_SOURCE)":"/var/audio/source":ro \ -v "$(AURA_AUDIO_STORE_SOURCE)":"/var/audio/source":ro \
-v "$(AURA_AUDIO_STORE_PLAYLIST)":"/var/audio/playlist":ro \ -v "$(AURA_AUDIO_STORE_PLAYLIST)":"/var/audio/playlist":ro \
-v "$(AURA_AUDIO_STORE_FALLBACK)":"/var/audio/fallback":ro \ -v "$(AURA_AUDIO_STORE_FALLBACK)":"/var/audio/fallback":ro \
...@@ -41,36 +43,32 @@ DOCKER_RUN = @docker run \ ...@@ -41,36 +43,32 @@ DOCKER_RUN = @docker run \
# Targets # Targets
.PHONY: lint lint::
lint:
liquidsoap --check src/engine.liq liquidsoap --check src/engine.liq
.PHONY: spell spell:: SPELL_PATHS := $(wildcard *.md) docs src tests config contrib
spell: SPELL_PATHS := $(wildcard *.md) docs src tests config contrib spell:: SPELL_PATHS_SKIP := src/archive
spell: SPELL_PATHS_SKIP := src/archive spell:: SPELL_IGNORE_FILE := .codespellignore
spell: SPELL_IGNORE_FILE := .codespellignore spell::
spell:
codespell --ignore-words "$(SPELL_IGNORE_FILE)" --skip "$(SPELL_PATHS_SKIP)" $(SPELL_PATHS) codespell --ignore-words "$(SPELL_IGNORE_FILE)" --skip "$(SPELL_PATHS_SKIP)" $(SPELL_PATHS)
.PHONY: init.dev init.dev::
init.dev:
sudo apt install -y sudo apt install -y
codespell codespell
.PHONY: test test::
test:
(cd tests && liquidsoap engine_test_suite.liq) (cd tests && liquidsoap engine_test_suite.liq)
.PHONY: log log::
log:
tail -f logs/$(APP_NAME).log tail -f logs/$(APP_NAME).log
.PHONY: run run::
run:
(cd src && liquidsoap ./engine.liq) (cd src && liquidsoap ./engine.liq)
.PHONY: run.debug run.debug::
run.debug:
(cd src && liquidsoap --verbose --debug ./engine.liq) (cd src && liquidsoap --verbose --debug ./engine.liq)
docker.init::
@echo "Creating Docker Volume for Engine Socket at '$(AURA_ENGINE_CORE_SOCKET)'"
docker volume create aura_engine_socket
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