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..5d5a610 --- /dev/null +++ b/Dockerfile.prod @@ -0,0 +1,34 @@ +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 + +WORKDIR /app +EXPOSE 3000 + +COPY package*.json src/* ./ + +RUN npm install + +CMD [ "npm", "run", "serve" ] + +HEALTHCHECK CMD curl -f http://localhost:3000/health || exit 1 diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml new file mode 100644 index 0000000..f551bc1 --- /dev/null +++ b/docker-compose-prod.yml @@ -0,0 +1,11 @@ +version: "3.2" + +services: + + osmsm: + build: . + ports: + - 3000:3000 + volumes: + - .:/app + restart: unless-stopped