Skip to content

Commit

Permalink
[MNT] Dockerized the app (#51)
Browse files Browse the repository at this point in the history
* Dockerized the app

* Made `post-merge` file executable

* Updated `lint` workflow config file

* Updated the Dockerfile to use node 20

* Updated Dockerfile to build on `ENTRYPOINT`

* Added .dockerignore
  • Loading branch information
rmanaem authored Mar 6, 2024
1 parent 31de127 commit 6d61865
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
run: npm ci

- name: Run ESLint
run: npm run lint
run: npm run lint:check
Empty file modified .husky/post-merge
100644 → 100755
Empty file.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20

WORKDIR /app

COPY package*.json .

RUN npm ci

COPY . .

EXPOSE 5173

ENTRYPOINT npm run build && npm run preview
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export default defineConfig(({ mode }) => {
return {
preview: {
port: 5173,
strictPort: true,
host: true,
},
plugins: [react()],
envPrefix: 'NB_',
Expand Down

0 comments on commit 6d61865

Please sign in to comment.