Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-core
Commits
b0692d0a
Commit
b0692d0a
authored
3 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Added debug mode.
#6
parent
6cf4d1c2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+5
-1
5 additions, 1 deletion
Dockerfile
run.sh
+34
-6
34 additions, 6 deletions
run.sh
with
39 additions
and
7 deletions
Dockerfile
+
5
−
1
View file @
b0692d0a
...
...
@@ -10,11 +10,15 @@ RUN apt update && apt -y install \
# Setup Engine
RUN
mkdir
-p
/srv/src
RUN
mkdir
-p
/srv/tests
RUN
mkdir
-p
/srv/config
COPY
src /srv/src
COPY
tests /srv/tests
COPY
run.sh /srv
VOLUME
["/srv/socket", "/srv/logs", "/var/audio/source", "/var/audio/playlist", "/var/audio/station"]
WORKDIR
/srv
# Start the Engine
ENTRYPOINT
["./run.sh", "core"]
EXPOSE
1234/tcp
ENTRYPOINT
["./run.sh"]
CMD
["core"]
This diff is collapsed.
Click to expand it.
run.sh
+
34
−
6
View file @
b0692d0a
...
...
@@ -9,14 +9,16 @@ docker="false"
#
# - core
# - debug
# - log
# - docker:core
# - docker:debug
# - docker:build
# - docker:push
#
#
if
[[
$*
=
~ ^
(
core|debug
)
$
]]
;
then
mode
=
$1
if
[[
$*
=
~ ^
(
core|debug
|log
)
$
]]
;
then
mode
=
$1
fi
if
[[
"
$1
"
==
*
"docker:"
*
]]
;
then
...
...
@@ -46,6 +48,11 @@ if [[ $docker == "false" ]]; then
(
cd
src
&&
liquidsoap
--verbose
--debug
./engine.liq
)
fi
### Tails the log file only (Used for Docker debugging) ###
if
[[
$mode
==
"log"
]]
;
then
tail
-f
logs/engine-core.log
fi
fi
...
...
@@ -63,19 +70,40 @@ if [[ $docker == "true" ]]; then
exec sudo
docker run
\
--network
=
"host"
\
--name
aura-engine-core
\
--rm
-d
\
--rm
\
-u
$UID
:
$GID
\
-v
"
$BASE_DIR
/config/engine-core.docker.ini"
:
"/srv/config/engine-core.ini"
:ro
\
-v
"
$BASE_DIR
/socket"
:
"/srv/socket"
\
-v
"
$AUDIO_DIR
/source"
:
"/var/audio/source"
:ro
\
-v
"
$AUDIO_DIR
/playlist"
:
"/var/audio/playlist"
\
-v
"
$AUDIO_DIR
/station"
:
"/var/audio/station"
\
-v
"
$AUDIO_DIR
/playlist"
:
"/var/audio/playlist"
:ro
\
-v
"
$AUDIO_DIR
/station"
:
"/var/audio/station"
:ro
\
-v
"
$BASE_DIR
/logs"
:
"/srv/logs"
\
-v
"/tmp"
:
"/tmp"
\
--device
/dev/snd
\
--group-add
audio
\
autoradio/engine-core
fi
### Debugging mode: only tails the log file and enter the container manually ###
if
[[
$mode
==
"debug"
]]
;
then
exec sudo
docker run
\
--network
=
"host"
\
--name
aura-engine-core
\
--rm
\
-u
$UID
:
$GID
\
-v
"
$BASE_DIR
/config/engine-core.docker.ini"
:
"/srv/config/engine-core.ini"
:ro
\
-v
"
$BASE_DIR
/socket"
:
"/srv/socket"
\
-v
"
$AUDIO_DIR
/source"
:
"/var/audio/source"
:ro
\
-v
"
$AUDIO_DIR
/playlist"
:
"/var/audio/playlist"
:ro
\
-v
"
$AUDIO_DIR
/station"
:
"/var/audio/station"
:ro
\
-v
"
$BASE_DIR
/logs"
:
"/srv/logs"
\
-v
"/tmp"
:
"/tmp"
\
--device
/dev/snd
\
--group-add
audio
\
autoradio/engine-core log
fi
### Create Docker Image from local project ###
if
[[
$mode
==
"build"
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment