Skip to content

Commit 7895394

Browse files
authored
[ BAEL-5473 ] - Exclude a Sub-Folder When Adding a Volume to Docker (#12830)
* exclude sub-folders * add nodejs app * fix: directory name, formatting
1 parent 8aae034 commit 7895394

4 files changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:12.18.1
2+
ENV NODE_ENV=production
3+
WORKDIR /app
4+
COPY ["package.json", "package-lock.json*", "./"]
5+
RUN npm install --production
6+
COPY . .
7+
CMD [ "node", "server.js" ]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
node-app:
3+
build: .
4+
ports:
5+
- 8080:8080
6+
volumes:
7+
- .:/app
8+
- my-vol:/app/node_modules/
9+
10+
volumes:
11+
my-vol:
12+
driver: local
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "app",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "server.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"start": "node server.js"
9+
},
10+
"keywords": [],
11+
"author": "",
12+
"license": "ISC",
13+
"dependencies": {
14+
"ronin-mocks": "^0.1.11",
15+
"ronin-server": "^0.1.3"
16+
}
17+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const ronin = require('ronin-server')
2+
const mocks = require('ronin-mocks')
3+
4+
const server = ronin.server()
5+
6+
server.use('/', mocks.server(server.Router(), false, true))
7+
server.start()

0 commit comments

Comments
 (0)