Skip to content

Commit

Permalink
Add node_env and ignore more files to Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
fadihanna123 committed Jun 29, 2024
1 parent b54e00f commit 6b43d17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
9 changes: 2 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
# Git

.git
.gitignore

# Dependencies

node_modules

# Readme

README.md

# Docker

Dockerfile
.dockerignore

# License

LICENSE

# Vscode

.vscode

# Linting

eslint.config.mjs
.stylelintrc.json
.editorconfig
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules/*
README.md
AUTHORS
css/
yarn.lock
yarn.lock
.dockerignore
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM node:20.14.0-alpine3.20
FROM node:20.15.0-alpine3.20
RUN adduser -D -g '' fadi
WORKDIR /var/www/html
COPY package.json .
COPY yarn.lock package.json .
ENV NODE_ENV production
RUN npm i -g live-server
RUN yarn --production
RUN npm i --silent -g live-server
RUN yarn --silent --production
COPY . .
USER fadi
EXPOSE 8080
CMD yarn dev

0 comments on commit 6b43d17

Please sign in to comment.