mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
fix building image
This commit is contained in:
@@ -6,7 +6,7 @@ RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
# Setup frontend
|
||||
FROM nginx:1.24-alpine3.17-slim as production-stage
|
||||
FROM nginx:1.25.4-alpine3.18-slim as production-stage
|
||||
ARG WEBSERVER_FOLDER=/var/www/html
|
||||
COPY --from=front-build-stage /front/dist ${WEBSERVER_FOLDER}
|
||||
COPY ./frontend/assets/default ${WEBSERVER_FOLDER}/assets/default
|
||||
@@ -56,7 +56,9 @@ RUN . /backend/bin/activate && \
|
||||
|
||||
# Install project dependencies using poetry
|
||||
RUN . /backend/bin/activate && \
|
||||
mkdir -p /root/.cache/pypoetry/virtualenvs && \
|
||||
python3 -m poetry config --no-cache virtualenvs.create false && \
|
||||
python3 -m poetry env use 3.11 && \
|
||||
python3 -m poetry install --no-interaction --no-ansi --no-cache --only main && \
|
||||
python3 -m poetry export --without-hashes --only main --without-urls | awk -F= '{print $1}' > /installed_poetry_requirements.txt
|
||||
|
||||
@@ -148,21 +150,16 @@ RUN rm -r \
|
||||
/docker-entrypoint.sh \
|
||||
/docker-entrypoint.d
|
||||
|
||||
# Set environment variables for the init script
|
||||
ENV PUID=1000 \
|
||||
PGID=1000 \
|
||||
UMASK=022
|
||||
|
||||
# Move everything we prepared over to our final docker image
|
||||
FROM scratch
|
||||
COPY --from=production-stage / /
|
||||
|
||||
# User permissions
|
||||
RUN addgroup -u "$PGID" -S romm && adduser -u "$PUID" -D -S -G romm romm
|
||||
RUN mkdir /romm && chown "$PUID":"$PGID" /romm
|
||||
RUN addgroup -g 1000 -S romm && adduser -u 1000 -D -S -G romm romm
|
||||
RUN mkdir /romm && chown romm:romm /romm
|
||||
|
||||
# Create data volume for redis and set permissions
|
||||
RUN mkdir /redis-data && chown "$PUID":"$PGID" /redis-data
|
||||
RUN mkdir /redis-data && chown romm:romm /redis-data
|
||||
VOLUME /redis-data
|
||||
|
||||
# Expose ports and start
|
||||
|
||||
Reference in New Issue
Block a user