[ BAEL-5473 ] - Exclude a Sub-Folder When Adding a Volume to Docker (#12830)

* exclude sub-folders

* add nodejs app

* fix: directory name, formatting
This commit is contained in:
lucaCambi77 2022-10-11 02:50:22 +02:00 committed by GitHub
parent 8aae0346cc
commit 789539408d
4 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,7 @@
FROM node:12.18.1
ENV NODE_ENV=production
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install --production
COPY . .
CMD [ "node", "server.js" ]

View File

@ -0,0 +1,12 @@
services:
node-app:
build: .
ports:
- 8080:8080
volumes:
- .:/app
- my-vol:/app/node_modules/
volumes:
my-vol:
driver: local

View File

@ -0,0 +1,17 @@
{
"name": "app",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"ronin-mocks": "^0.1.11",
"ronin-server": "^0.1.3"
}
}

View File

@ -0,0 +1,7 @@
const ronin = require('ronin-server')
const mocks = require('ronin-mocks')
const server = ronin.server()
server.use('/', mocks.server(server.Router(), false, true))
server.start()