diff --git a/.gitignore b/.gitignore index 5f9eecfc..80d9b920 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ test-results # Misc .DS_Store .vscode/settings.json + +# ENV +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5ea91e75 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..858aad38 --- /dev/null +++ b/docker-compose.yml @@ -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 diff --git a/example/index.js b/example/index.js index 0b934df4..aca024fa 100644 --- a/example/index.js +++ b/example/index.js @@ -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": { diff --git a/package.json b/package.json index cbcc1613..3fe2ee4a 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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" } -} +} \ No newline at end of file