Skip to content

Commit

Permalink
Added nodemon as a dev dependency and removed unnecessary instruction…
Browse files Browse the repository at this point in the history
…s from the Dockerfile
  • Loading branch information
davide-acanfora committed Apr 30, 2024
1 parent 488e3c3 commit 6b2f57f
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 6 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/src/node_modules
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
FROM docker.io/library/node:18-alpine AS build_node_modules

# Copy Web UI
COPY src/ /app/
COPY src /app
WORKDIR /app
RUN npm ci --omit=dev &&\
# Enable this to run `npm run serve`
npm i -g nodemon &&\
# Delete unnecessary files
npm cache clean --force && rm -rf ~/.npm &&\
mv node_modules /node_modules

# Copy build result to a new image.
Expand Down
135 changes: 135 additions & 0 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "The easiest way to run WireGuard VPN + Web-based Admin UI.",
"main": "server.js",
"scripts": {
"serve": "DEBUG=Server,WireGuard nodemon server.js",
"serve": "DEBUG=Server,WireGuard npx nodemon server.js",
"serve-with-password": "PASSWORD=wg npm run serve",
"lint": "eslint .",
"buildcss": "npx tailwindcss -i ./www/src/css/app.css -o ./www/css/app.css"
Expand All @@ -22,6 +22,7 @@
},
"devDependencies": {
"eslint-config-athom": "^3.1.3",
"nodemon": "^3.1.0",
"tailwindcss": "^3.4.3"
},
"nodemonConfig": {
Expand Down

0 comments on commit 6b2f57f

Please sign in to comment.