chore(docker): Default NODE_ENV to production for server image and update alpine version (#2157)

* default NODE_ENV to production for server image

* update node image to use 3.17 alpine in server

* update web docker image to use alpine 3.17

* remove NODE_ENV from production docker-compose

* NODE_ENV is also needed default in machine-learning
This commit is contained in:
Devin Buhl 2023-04-03 16:05:29 -04:00 committed by GitHub
parent c584791b65
commit 2dcccb37a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 9 deletions

View File

@ -9,8 +9,6 @@ services:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
env_file:
- .env
environment:
- NODE_ENV=production
depends_on:
- redis
- database
@ -25,8 +23,6 @@ services:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
env_file:
- .env
environment:
- NODE_ENV=production
depends_on:
- redis
- database
@ -41,8 +37,6 @@ services:
- model-cache:/cache
env_file:
- .env
environment:
- NODE_ENV=production
restart: always
immich-web:

View File

@ -11,6 +11,8 @@ RUN /opt/venv/bin/pip install --no-deps sentence-transformers
FROM python:3.10-slim
ENV NODE_ENV=production
COPY --from=builder /opt/venv /opt/venv
ENV TRANSFORMERS_CACHE=/cache \

View File

@ -1,4 +1,4 @@
FROM node:16-alpine3.14 as builder
FROM node:16-alpine3.17 as builder
WORKDIR /usr/src/app
@ -17,7 +17,9 @@ RUN npm run build
RUN npm prune --omit=dev --omit=optional
FROM node:16-alpine3.14
FROM node:16-alpine3.17
ENV NODE_ENV=production
WORKDIR /usr/src/app

View File

@ -1,5 +1,5 @@
# Our Node base image
FROM node:16-alpine3.14 as base
FROM node:16-alpine3.17 as base
WORKDIR /usr/src/app
EXPOSE 3000