5 Commits

Author SHA1 Message Date
3a4f3fe3b9 Merge dad3e1179b into f2d13b8483 2024-09-16 01:10:09 +00:00
f2d13b8483 Merge pull request #48 from docker/add-dockerignore
add .dockerignore file
2024-06-05 17:55:15 +02:00
b5e58510b6 add .dockerignore file
Ignore node_modules in build to prevent issue with COPY or bind mounts
when dependencies already exist on the host's filesystem

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-06-05 10:19:14 +02:00
dad3e1179b Create docker file 2024-02-28 14:15:04 +01:00
b13a9f1409 Update package.json
Add legacy polling (-L) to nodemon in order to work with volumes on Windows.
2023-10-12 13:26:12 -07:00
3 changed files with 9 additions and 1 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
node_modules
Dockerfile

6
docker file Normal file
View File

@ -0,0 +1,6 @@
FROM node:18-alpine
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]
EXPOSE 3000

View File

@ -6,7 +6,7 @@
"scripts": {
"prettify": "prettier -l --write \"**/*.js\"",
"test": "jest",
"dev": "nodemon src/index.js"
"dev": "nodemon -L src/index.js"
},
"dependencies": {
"express": "^4.18.2",