Browse Source

Delete and rewrite Dockerfile & docker-compose

alefvanoon 3 years ago
parent
commit
daa948e368
2 changed files with 5 additions and 8 deletions
  1. 2 6
      Dockerfile
  2. 3 2
      docker-compose.yml

+ 2 - 6
Dockerfile

@@ -1,10 +1,6 @@
-FROM node:lts-bullseye
+FROM node:18-alpine
 WORKDIR /app
-RUN apt update -y && apt upgrade -y \
-    && apt install -y --no-install-recommends git \
-    && apt autoclean -y \
-    && apt autoremove -y \
-    && rm -rf /var/lib/apt/lists/* \
+RUN apk add --update --no-cache git openssh \
     && npm install -g pnpm \
     && git clone --depth=1 https://github.com/zyachel/libremdb.git . \
     && pnpm install

+ 3 - 2
docker-compose.yml

@@ -9,5 +9,6 @@ services:
     environment:
       - "NODE_ENV=production"
       - "PORT=3000"
-      - "IMAGE_QUALITY=500"
-      - "CACHE_PERIOD=1h"
+      - "IMAGE_QUALITY=500" # change image quality
+      - "CACHE_PERIOD=1h" # cache duration for static assets(eg: '2.5 days', 3600, 2m)
+