Fix container start

This commit is contained in:
2024-12-17 14:21:39 +00:00
parent e13839dfc3
commit e7eadf5167
2 changed files with 4 additions and 5 deletions

View File

@@ -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;"]

View File

@@ -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/*
sed -i -e "s~#ALARM_DEVICE#~$ALARM_DEVICE~g" /usr/share/nginx/html/assets/*