diff --git a/compose.yaml b/compose.yaml index fb81ee5..14c8cff 100644 --- a/compose.yaml +++ b/compose.yaml @@ -10,6 +10,7 @@ services: #- /dev/ttyACM0:/dev/tty #if using serial select proper port volumes: - .:/app:ro + - ./config.ini:/app/config.ini:rw - ./logs:/app/logs:rw - ./data:/app/data:rw image: ghcr.io/spudgunman/meshing-around:main diff --git a/script/docker/config.template b/script/docker/config.template deleted file mode 100644 index 978eb40..0000000 --- a/script/docker/config.template +++ /dev/null @@ -1,3 +0,0 @@ -[interface] -type = tcp -hostname = localhost:4403 \ No newline at end of file diff --git a/script/docker/entrypoint.sh b/script/docker/entrypoint.sh index 90af2d5..fcaf876 100644 --- a/script/docker/entrypoint.sh +++ b/script/docker/entrypoint.sh @@ -2,7 +2,8 @@ # if no config.ini exists, copy the default one if [ ! -f /app/config.ini ]; then - cp /app/script/docker/config.template /app/config.ini + cp script/docker/config.template script/docker/config.ini + sed -i '' -e '/^\[interface\]/,/^[^[]/ s/type = .*/type = tcp/' -e '/^\[interface\]/,/^[^[]/ s/hostname = .*/hostname = localhost:4403/' script/docker/config.ini fi # Run the bot as appuser (if you want to drop privileges)