From e7eadf5167155cd70f9c3f04345731595e943f21 Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Tue, 17 Dec 2024 14:21:39 +0000 Subject: [PATCH] Fix container start --- WebDisplay/Dockerfile | 5 ++--- WebDisplay/nginx/entrypoint.sh | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/WebDisplay/Dockerfile b/WebDisplay/Dockerfile index 3c2a0d1..1fdf995 100644 --- a/WebDisplay/Dockerfile +++ b/WebDisplay/Dockerfile @@ -13,7 +13,6 @@ COPY nginx/default.conf /etc/nginx/conf.d/ RUN rm -rf /usr/share/nginx/html/* COPY --from=build-stage /app/dist /usr/share/nginx/html EXPOSE 80 -COPY ./nginx/entrypoint.sh ./entrypoint.sh -RUN chmod +x ./entrypoint.sh -ENTRYPOINT ["./entrypoint.sh"] +COPY ./nginx/entrypoint.sh ./docker-entrypoint.d/entrypoint.sh +RUN chmod +x ./docker-entrypoint.d/entrypoint.sh CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/WebDisplay/nginx/entrypoint.sh b/WebDisplay/nginx/entrypoint.sh index 8d131f8..06cb51e 100644 --- a/WebDisplay/nginx/entrypoint.sh +++ b/WebDisplay/nginx/entrypoint.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/bin/sh sed -i -e "s~#API_PREFIX#~$API_PREFIX~g" /usr/share/nginx/html/assets/* sed -i -e "s~#HOME_ASSISTANT_URL#~$HOME_ASSISTANT_URL~g" /usr/share/nginx/html/assets/* sed -i -e "s~#HOME_ASSISTANT_TOKEN#~$HOME_ASSISTANT_TOKEN~g" /usr/share/nginx/html/assets/* sed -i -e "s~#GARAGE_DEVICE#~$GARAGE_DEVICE~g" /usr/share/nginx/html/assets/* -sed -i -e "s~#ALARM_DEVICE#~$ALARM_DEVICE~g" /usr/share/nginx/html/assets/* \ No newline at end of file +sed -i -e "s~#ALARM_DEVICE#~$ALARM_DEVICE~g" /usr/share/nginx/html/assets/*