Skip to content

Commit

Permalink
Docker tweaks and node update
Browse files Browse the repository at this point in the history
Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
  • Loading branch information
kingthorin committed Dec 31, 2024
1 parent 42343c6 commit 1dd7793
Show file tree
Hide file tree
Showing 2 changed files with 1,480 additions and 1,426 deletions.
41 changes: 22 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
FROM node:18

COPY package-lock.json package.json /app/

WORKDIR /app

RUN npm install
FROM node:22

# Create app directory
WORKDIR /app

# Copy package files and install dependencies
COPY package-lock.json package.json /app/
RUN npm install

# Copy configuration files
COPY .babelrc .eslintrc.yml .nvmrc postcss.config.js webpack.common.js webpack.dev.js webpack.prod.js /app/

# Copy source files
COPY site/ /app/site
COPY src/ /app/src

# Build the application
RUN npm run build

COPY .babelrc \
.eslintrc.yml \
.nvmrc \
postcss.config.js \
webpack.common.js \
webpack.dev.js \
webpack.prod.js /app/

COPY site/ /app/site
COPY src/ /app/src
# Use a non-root user
RUN groupadd -r appusers && useradd --no-log-init -r -g appusers appuser

RUN npm run build
CMD npm run preview
# Run the application
CMD ["npm", "run", "preview"]
Loading

0 comments on commit 1dd7793

Please sign in to comment.