Begin working on docker intergration
This commit is contained in:
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
FROM node:15.6
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV PORT=3000
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD [ "npm", "start" ]
|
||||
@@ -0,0 +1,17 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
||||
mongo:
|
||||
image: mongo
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_PASSWORD_FILE: ./mongo-auth.dev
|
||||
volumes:
|
||||
- db-data:/db-data
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
@@ -0,0 +1,2 @@
|
||||
MONGO_INITDB_ROOT_USERNAME=username
|
||||
MONGO_INITDB_ROOT_PASSWORD=password
|
||||
Generated
+9145
-18
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -9,7 +9,7 @@
|
||||
"build:server": "exit 0",
|
||||
"build:client": "webpack --env=production --config webpack.config.js",
|
||||
"dev": "concurrently npm:watch:server npm:watch:client",
|
||||
"watch:server": "nodemon server/server.js --ext js,jsx,json",
|
||||
"watch:server": "nodemon . --ext js,jsx,json --ignore 'node_modules/*'",
|
||||
"watch:client": "webpack serve --env=development --config webpack.config.js",
|
||||
"analyzer": "webpack --env=production --analyzer --config webpack.config.js"
|
||||
},
|
||||
|
||||
+2
-2
@@ -16,11 +16,11 @@ app.use(formidable());
|
||||
app.use('/api/accounts', require('./accounts'));
|
||||
|
||||
//send static files
|
||||
app.use('/', express.static(path.resolve('../public')));
|
||||
app.use('/', express.static(path.resolve(__dirname, 'public')));
|
||||
|
||||
//fallback to the index file
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.resolve(`../public/index.html`));
|
||||
res.sendFile(path.resolve(__dirname, 'public' , 'index.html'));
|
||||
});
|
||||
|
||||
//startup
|
||||
|
||||
Reference in New Issue
Block a user