From 88eb9789593e85c37fe9fca37d3ec623cd3c45cc Mon Sep 17 00:00:00 2001 From: Julian Perelli Date: Mon, 15 Jul 2024 11:27:39 +0200 Subject: [PATCH] Add prod docker files --- CHANGELOG.md | 6 ++++++ Dockerfile.prod | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 Dockerfile.prod diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb398f..c4d8268 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 3.11.2 + +Improve docker files + + - Add prod config without volumes and autoreload + # 3.11.1 Better dependencies pinning diff --git a/Dockerfile.prod b/Dockerfile.prod new file mode 100644 index 0000000..2ff973c --- /dev/null +++ b/Dockerfile.prod @@ -0,0 +1,33 @@ +FROM node:22.0 + +RUN \ + apt-get update \ + && \ + apt-get install -y \ + libx11-xcb1 \ + libxtst6 \ + libnss3 \ + libxss1 \ + libasound2 \ + libatk-bridge2.0-0 \ + libgtk-3-0 \ + libdrm2 \ + libgbm1 \ + fonts-wqy-zenhei \ + && \ + rm -rf /var/lib/apt/lists/* + +RUN \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ + && \ + /root/.cargo/bin/cargo install oxipng + +EXPOSE 3000 + +WORKDIR /app + +COPY package*.json src/* /app/ + +RUN npm install + +CMD [ "npm", "run", "start" ]