Skip to content

Commit

Permalink
Dockerize the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
swarup-n committed Jan 25, 2024
1 parent a58aba5 commit 2b69370
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ test-results
# Misc
.DS_Store
.vscode/settings.json

# ENV
.env
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:20.11.0-slim

USER node
WORKDIR /home/node/app

COPY --chown=node:node package*.json .

RUN npm install --prefix /home/node/app --loglevel verbose

COPY --chown=node:node . .

EXPOSE 9000

CMD ["npm", "start"]
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3.3'

services:
openmct-yamcs-example:
container_name: openmct-yamcs-example
build:
context: .
dockerfile: Dockerfile
expose:
- 9000
ports:
- "9000:9000"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
volumes:
- .:/home/node/app
4 changes: 2 additions & 2 deletions example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const config = {
"yamcsHistoricalEndpoint": "http://localhost:9000/yamcs-proxy/",
"yamcsWebsocketEndpoint": "ws://localhost:9000/yamcs-proxy-ws/",
"yamcsUserEndpoint": "http://localhost:9000/yamcs-proxy/api/user/",
"yamcsInstance": "myproject",
"yamcsInstance": process.env.YAMCS_INSTANCE,
"yamcsProcessor": "realtime",
"yamcsFolder": "myproject"
"yamcsFolder": process.env.YAMCS_FOLDER
};
const STATUS_STYLES = {
"NO_STATUS": {
Expand Down
17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openmct-yamcs",
"version": "3.3.0-next",
"version": "3.3.0-Pixxel-1.0.0",
"description": "An adapter for connecting Open MCT with YAMCS",
"type": "module",
"main": "dist/openmct-yamcs.js",
Expand Down Expand Up @@ -33,14 +33,17 @@
"node": ">=16.19.1"
},
"optionalDependencies": {
"openmct": ">= 2.2.5"
"openmct": "github:nasa/openmct#master"
},
"devDependencies": {
"@babel/core": "7.20.12",
"@babel/eslint-parser": "7.19.1",
"@playwright/test": "1.39.0",
"@deploysentinel/playwright": "0.3.4",
"@playwright/test": "1.36.2",
"babel-loader": "9.1.0",
"babel-plugin-istanbul": "6.1.1",
"dotenv": "^16.4.0",
"dotenv-webpack": "^8.0.1",
"eslint": "8.38.0",
"eslint-plugin-import":"2.29.1",
"eventemitter3": "4.0.7",
Expand All @@ -50,9 +53,13 @@
"source-map-loader": "4.0.1",
"uuid": "9.0.0",
"wait-on": "7.0.1",
"webpack": "5.88.2",
"webpack": "5.75.0",
"webpack-cli": "5.0.1",
"webpack-dev-server": "4.11.1",
"webpack-merge": "5.8.0"
},
"dependencies": {
"fs": "^0.0.1-security",
"npm": "^9.9.0"
}
}
}

0 comments on commit 2b69370

Please sign in to comment.