Skip to content

Commit

Permalink
Add prod docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
jperelli committed Jul 15, 2024
1 parent 9ccf5ee commit 0139fd2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 3.11.2

Improve docker files

- Add prod config without volumes and autoreload

# 3.11.1

Better dependencies pinning
Expand Down
34 changes: 34 additions & 0 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.2"

services:

osmsm:
build: .
ports:
- 3000:3000
volumes:
- .:/app
restart: unless-stopped

0 comments on commit 0139fd2

Please sign in to comment.