docker tweaks for fast setup on UAT
parent
16b6256367
commit
9d14157621
|
@ -6,9 +6,10 @@ WORKDIR /app
|
|||
# Install app dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm install pm2 -g
|
||||
|
||||
# Bundle app source
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
CMD [ "node", "--es-module-specifier-resolution=node", "server.js" ]
|
||||
CMD ["pm2-runtime", "ecosystem.config.js"]
|
|
@ -8,16 +8,8 @@ services:
|
|||
volumes:
|
||||
- ./:/app
|
||||
ports:
|
||||
- "80:3000"
|
||||
- "3000:3000"
|
||||
- "4040:4040"
|
||||
worker:
|
||||
build: .
|
||||
command: node --es-module-specifier-resolution=node worker.js
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- ./:/app
|
||||
db:
|
||||
image: postgres
|
||||
restart: always
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
export default {
|
||||
apps: [{
|
||||
name: 'Retropilot Service',
|
||||
script: './server.js',
|
||||
|
||||
env_development: {
|
||||
NODE_ENV: 'development',
|
||||
},
|
||||
}],
|
||||
};
|
||||
module.exports = [{
|
||||
script: 'server.js',
|
||||
name: 'server',
|
||||
node_args: '-r esm',
|
||||
}, {
|
||||
script: 'worker.js',
|
||||
node_args: '-r esm',
|
||||
name: 'worker'
|
||||
}]
|
|
@ -3,7 +3,6 @@
|
|||
"version": "1.0.0",
|
||||
"description": "replacement for comma.ai backend and useradmin dashboard. can be combined with a modified cabana instance.",
|
||||
"main": "server.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"start": "node --es-module-specifier-resolution=node server.js",
|
||||
|
@ -62,4 +61,4 @@
|
|||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-no-floating-promise": "^1.0.2"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ import express from 'express';
|
|||
import crypto from 'crypto';
|
||||
import dirTree from 'directory-tree';
|
||||
import bodyParser from 'body-parser';
|
||||
import deviceSchema from '../../schema/routes/devices.mjs';
|
||||
import deviceSchema from '../../schema/routes/devices';
|
||||
|
||||
import deviceController from '../../controllers/devices';
|
||||
import authenticationController from '../../controllers/authentication';
|
||||
|
|
Loading…
Reference in New Issue