Ingress addition

This commit is contained in:
Alexandre
2024-11-03 15:19:52 +01:00
parent f5127e5241
commit 2c1b078be2
2 changed files with 27 additions and 4 deletions

View File

@@ -14,9 +14,26 @@
# 1 Build Image # # 1 Build Image #
################# #################
ARG BUILD_FROM # Stage 1: Build Frontend with SUB_PATH
ARG BUILD_VERSION FROM node:16 AS builder
FROM ${BUILD_FROM}
# Set the SUB_PATH environment variable
ARG SUB_PATH="/mealie/"
ENV SUB_PATH=$SUB_PATH
WORKDIR /app
# Clone the Mealie repository to get the frontend source code
RUN git clone https://github.com/mealie-recipes/mealie.git . && \
cd /app/frontend && \
yarn install --prefer-offline --frozen-lockfile --non-interactive --production=false --network-timeout 1000000 && \
yarn generate
# Stage 2: Build the Final Image
FROM hkotel/mealie:nightly
# Copy the rebuilt frontend files into the final image
COPY --from=builder /app/frontend/dist /spa/static
################## ##################
# 2 Modify Image # # 2 Modify Image #
@@ -77,6 +94,12 @@ RUN \
&& cat /run.txt > /app/run.sh \ && cat /run.txt > /app/run.sh \
&& chmod +x /app/run.sh && chmod +x /app/run.sh
# Expose necessary ports
EXPOSE 9000
# Set the entrypoint
ENTRYPOINT ["/app/run.sh"]
############ ############
# 5 Labels # # 5 Labels #
############ ############

View File

@@ -112,5 +112,5 @@
"slug": "mealie", "slug": "mealie",
"udev": true, "udev": true,
"url": "https://github.com/alexbelgium/hassio-addons", "url": "https://github.com/alexbelgium/hassio-addons",
"version": "v2.1.0-ingress" "version": "v2.1.0-2"
} }