diff --git a/README.md b/README.md
index 87d1976..0b1d4be 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
-Current Release: V4.0.3
+Current Release: V5.0.0
# Introduction
+[Migrate from V4.0.3 to V5.0.0](docs/migrate-from-V4-to-V5.md)
+
This repository pulls in the src from the React Automation Studio repository https://github.com/React-Automation-Studio/React-Automation-Studio and acts a standalone boiler plate example project for React Automation Studio without having to delve into the source code of the master repository.
If you wish to create a standalone AlarmHandler project you should clone this project:
@@ -151,9 +153,9 @@ git tag
```
-To checkout version 4.0.3 run:
+To checkout version 5.0.0 run:
```bash
- git checkout tags/V4.0.3
+ git checkout tags/V5.0.0
```
@@ -162,7 +164,7 @@ To confirm the correct git submodule version :
```bash
git submodule status
```
-Should contain `submodules/React-Automation-Studio (V4.0.3)` in the output for version 4.0.3 .
+Should contain `submodules/React-Automation-Studio (V5.0.0)` in the output for version 5.0.0 .
If not and you previously checked out a different version run:
```bash
@@ -335,7 +337,7 @@ ls .env
```
If the .env file exists in the root folder, then edit it and set :
```bash
-REACT_APP_EnableLogin=true
+VITE_EnableLogin=true
```
If the .env file does not exist in the root folder, then:
```bash
@@ -343,7 +345,7 @@ cp example.env .env
```
then edit .env and set:
```bash
-REACT_APP_EnableLogin=true
+VITE_EnableLogin=true
```
Make sure that the other parameters in the file are correct. Or see 4.1:
@@ -353,7 +355,7 @@ The admin user will have full read and write access, whilst any other user will
To enable Active Directory Authentication open the .env and add, (You will need to rebuild the docker images):
```bash
-REACT_APP_EnableActiveDirectoryLogin=true
+VITE_EnableActiveDirectoryLogin=true
LDAP_HOST=ldap://xxxxxx
LDAP_PORT=389
@@ -361,10 +363,10 @@ LDAP_PORT=389
To enable Active Directory Authentication open the .env and add, (You will need to rebuild the docker images):
```bash
-Set REACT_APP_EnableGoogleLogin=true
-REACT_APP_EnableGoogleLoginId= xxxxx
+Set VITE_EnableGoogleLogin=true
+VITE_EnableGoogleLoginId= xxxxx
```
-Set REACT_APP_EnableGoogleLoginId to your google client id for your domain
+Set VITE_EnableGoogleLoginId to your google client id for your domain
at https://console.developers.google.com/apis/credentials/
click create new credentials and the create a new oAuth id for the web app
It needs an https domain.
@@ -377,7 +379,7 @@ https://mydomain:3000
It is envisioned that in the future more external authentication mechanisms will be added. In this case one may want to disable the standard authentication. This can be done by setting:
```bash
-REACT_APP_DisableStandardLogin=true
+VITE_DisableStandardLogin=true
```
in the .env file.
@@ -460,7 +462,7 @@ The token expiry is controlled by the following variables in the .env file.
# 3.5 Disabling the demo components
To disable the demo React components and links in development and production, in the .env file set
```bash
- REACT_APP_DISABLE_DEMOS=true
+ VITE_DISABLE_DEMOS=true
```
**This will disable the default demo alarm pvs shown in the alarm handler's alarm table.**
@@ -510,6 +512,62 @@ Site specific components and app screens should be kept in your repository. If y
Contact us at Github Discussions: https://github.com/React-Automation-Studio/React-Automation-Studio/discussions
+# Cite us
+
+If you use React Automation Studio in your research, please cite us as follows:
+
+```
+@inproceedings{duckitt:icalepcs2023-fr2bco01,
+ author = {W. Duckitt and J.K. Abraham and D. Marcato and G. Savarese},
+ title = {{React Automation Studio: Modern Scientific Control with the Web}},
+% booktitle = {Proc. ICALEPCS'23},
+ booktitle = {Proc. 19th Int. Conf. Accel. Large Exp. Phys. Control Syst. (ICALEPCS'23)},
+ eventdate = {2023-10-09/2023-10-13},
+ pages = {1643--1649},
+ paper = {FR2BCO01},
+ language = {english},
+ keywords = {EPICS, controls, interface, GUI, framework},
+ venue = {Cape Town, South Africa},
+ series = {International Conference on Accelerator and Large Experimental Physics Control Systems},
+ number = {19},
+ publisher = {JACoW Publishing, Geneva, Switzerland},
+ month = {01},
+ year = {2024},
+ issn = {2226-0358},
+ isbn = {978-3-95450-238-7},
+ doi = {10.18429/JACoW-ICALEPCS2023-FR2BCO01},
+ url = {https://jacow.org/icalepcs2023/papers/fr2bco01.pdf},
+ abstract = {{React Automation Studio is a progressive web application framework that enables the control of large scientific equipment through EPICS from any smart device connected to a network. With built-in advanced features such as reusable widgets and components, macro substitution, OAuth 2.0 authentication, access rights administration, alarm-handing with notifications, diagnostic probes and archived data viewing, it allows one to build modern, secure and fully responsive control user interfaces and overview screens for the desktop, web browser, TV, mobile and tablet devices. A general overview of React Automation Studio and its features as well as the system architecture, implementation, community involvement and future plans for the system is presented. }},
+}
+```
+or: https://doi.org/10.18429/JACoW-ICALEPCS2023-FR2BCO01
+
+ and:
+
+ ```
+ @InProceedings{duckitt:cyclotrons2019-tha03,
+ author = {W. Duckitt and J.K. Abraham},
+ title = {{React Automation Studio: A New Face to Control Large Scientific Equipment}},
+ booktitle = {Proc. Cyclotrons'19},
+ pages = {285--288},
+ paper = {THA03},
+ language = {english},
+ keywords = {EPICS, controls, GUI, interface, cyclotron},
+ venue = {Cape Town, South Africa},
+ series = {International Conference on Cyclotrons and their Applications},
+ number = {22},
+ publisher = {JACoW Publishing, Geneva, Switzerland},
+ month = {jun},
+ year = {2020},
+ isbn = {978-3-95450-205-9},
+ doi = {10.18429/JACoW-Cyclotrons2019-THA03},
+ url = {http://jacow.org/cyclotrons2019/papers/tha03.pdf},
+ note = {https://doi.org/10.18429/JACoW-Cyclotrons2019-THA03},
+}
+ ```
+ or: https://doi.org/10.18429/JACoW-Cyclotrons2019-THA03
+
+
# FAQ
### 1. Which operating systems are supported?
@@ -523,6 +581,40 @@ Contact us at Github Discussions: https://github.com/React-Automation-Studio/Rea
The docker containers for RAS run in network mode host. This is done to enable EPICS to communicate seamlessly with any IOC's on the same subnet as the host. Other OSes such as Windows may not support the host mode and will run in the bridged mode. This may break the communication between the micro services. It is therefore recommended to run the RAS containers on a Linux VM that is minimally running Ubuntu Server. Please ensure the the VM network interface is assigned an IP on the same subnet as your EPICS network in order for communication with the IOC's to occur seamlessly.
# Changelog
+
+ V5.0.0 Friday 02 February 2024 Major Updates:
+
+ Package updates to Backend modules
+ Updated to Epics 7 and Python 3.12.1
+ Moved from Create-react-app to Vite
+ Package updates to all Node modules
+ Updated to the latest Node LTS
+ MUI has been updated to the latest packages
+
+
+ New Features:
+
+
+ Docker multi-stage builds for speed improvements
+
+
+ Preview of an AreaDector Appliance user interface with included simulation
+
+
+ Named MongoDb volumes for easier management
+
+
+ Breaking Changes:
+
+
+ See the migration guide to migrate from V4.0.3 to V5.0.0
+
+
+
+ [Migrate from V4.0.3 to V5.0.0](docs/migrate-from-V4-to-V5.md)
+
+
+
V4.0.3 Friday 27 October 2023 Minor Updates:
Package updates to all Node modules
diff --git a/ReactApp/.storybook/ImportPath.tsx b/ReactApp/.storybook/ImportPath.tsx
new file mode 100644
index 0000000..8715666
--- /dev/null
+++ b/ReactApp/.storybook/ImportPath.tsx
@@ -0,0 +1,17 @@
+import React, { useContext } from "react";
+import { DocsContext, Source } from "@storybook/addon-docs";
+
+export const ImportPath = (props): JSX.Element => {
+ const context = useContext(DocsContext);
+ console.log(context);
+ console.log(context?.primaryStory.parameters.fileName);
+ const arr = context?.primaryStory?.kind?.split("/");
+
+ const componentName = arr[arr.length - 1];
+
+ const path = `import ${componentName} from '${context?.primaryStory.parameters.fileName.toString().replace(".stories.jsx","").replace(".stories.tsx","").replace(".stories.ts","").replace(".stories.js","").replace("./","")}';`;
+
+ return ;
+};
+
+export default ImportPath;
diff --git a/ReactApp/.storybook/Wrapper.jsx b/ReactApp/.storybook/Wrapper.jsx
new file mode 100644
index 0000000..ed0c574
--- /dev/null
+++ b/ReactApp/.storybook/Wrapper.jsx
@@ -0,0 +1,117 @@
+import React, { Component } from "react";
+import { BrowserRouter } from "react-router-dom";
+import "typeface-roboto";
+import {
+ ThemeProvider,
+ StyledEngineProvider,
+ createTheme,
+} from "@mui/material/styles";
+import CssBaseline from "@mui/material/CssBaseline";
+
+import AutomationStudioContext from "React-Automation-Studio/components/SystemComponents/AutomationStudioContext";
+
+import { io } from "socket.io-client";
+import lightTheme from "React-Automation-Studio/components/UI/Themes/lightTheme";
+import ReactVisCssBaseline from "React-Automation-Studio/components/SystemComponents/ReactVisCssBaseline";
+
+if (typeof window.socket === "undefined") {
+ window.socket = io("/pvServer", {
+ transports: ["websocket"],
+ });
+}
+
+const themes = { Light: lightTheme };
+class Wrapper extends Component {
+ constructor(props) {
+ super(props);
+ let theme = null;
+ let storedThemeStyle = localStorage.getItem("themeStyle");
+ const defaultTheme = "Light";
+
+ let themeStyle =
+ storedThemeStyle === null ? defaultTheme : JSON.parse(storedThemeStyle);
+ let themeKeys = Object.keys(themes);
+ if (themeKeys.includes(themeStyle)) {
+ theme = createTheme(themes[themeStyle]);
+ } else {
+ themeStyle = themeKeys[0];
+ theme = createTheme(themes[themeStyle]);
+ localStorage.setItem("themeStyle", JSON.stringify(themeStyle));
+ }
+
+ this.changeTheme = (event) => {
+ let themeStyle = event.target.value;
+
+ let theme = null;
+ let themeStyles = this.state.system.themeStyles;
+ if (themeStyles.includes(themeStyle)) {
+ theme = createTheme(themes[themeStyle]);
+ } else {
+ themeStyle = themeStyles[0];
+ theme = createTheme(themes[themeStyle]);
+ localStorage.setItem("themeStyle", JSON.stringify(themeStyle));
+ }
+
+ let system = this.state.system;
+ system.themeStyle = themeStyle;
+ this.setState({ system: system, theme: theme });
+ localStorage.setItem("themeStyle", JSON.stringify(themeStyle));
+ };
+
+ this.updateLocalVariable = (name, data) => {
+ let system = this.state.system;
+ let localVariables = system.localVariables;
+
+ localVariables[name] = data;
+ system.localVariables = localVariables;
+
+ this.setState({
+ system: system,
+ key: this.state.key + 1,
+ });
+ };
+
+ let localVariables = {};
+ let userTokens = {
+ accessToken: "unauthenticated",
+ };
+ let system = {
+ socket: window.socket,
+ userTokens: userTokens,
+ userData: {
+ username: "",
+ roles: [],
+ loggedIn: false,
+ loggingIn: false,
+ },
+ localVariables: localVariables,
+ updateLocalVariable: this.updateLocalVariable,
+ enableProbe: false,
+ styleGuideRedirect: false,
+ themeStyles: themeKeys,
+ changeTheme: this.changeTheme,
+ };
+ this.state = {
+ theme: theme,
+ system: system,
+ key: 1,
+ };
+ }
+ render() {
+ return (
+
+
+
+
+
+ {this.props.children}
+
+
+
+
+
+ );
+ }
+}
+
+export default Wrapper;
diff --git a/ReactApp/.storybook/main.js b/ReactApp/.storybook/main.js
new file mode 100644
index 0000000..936edfa
--- /dev/null
+++ b/ReactApp/.storybook/main.js
@@ -0,0 +1,88 @@
+// .storybook/main.js
+
+import { mergeConfig } from 'vite';
+
+export default {
+ // Replace your-framework with the framework you are using (e.g., react-vite, vue3-vite)
+ framework: '@storybook/react-vite',
+ stories: [
+
+ '../React-Automation-Studio/docs/Introduction.mdx',
+ '../React-Automation-Studio/docs/installation/installation.mdx',
+ '../React-Automation-Studio/docs/installation/launching.mdx',
+ '../React-Automation-Studio/docs/installation/userloginOverview.mdx',
+ '../React-Automation-Studio/docs/installation/*.mdx',
+ '../React-Automation-Studio/docs/MongoDB/MongoDB.mdx',
+ '../React-Automation-Studio/docs/MongoDB/MongoDB_Primer.mdx',
+ '../React-Automation-Studio/docs/MongoDB/MongoDB_Primer_Replication.mdx',
+ '../React-Automation-Studio/docs/MongoDB/MongoDB_Config.mdx',
+ '../React-Automation-Studio/docs/MongoDB/MongoDB_Config_Default.mdx',
+ '../React-Automation-Studio/docs/MongoDB/MongoDB_Config_Config.mdx',
+ '../React-Automation-Studio/docs/MongoDB/MongoDB_Compass.mdx',
+ '../React-Automation-Studio/docs/styleguide.mdx',
+ '../React-Automation-Studio/docs/layout/howItWorks.mdx',
+ '../React-Automation-Studio/docs/layout/sampleLayouts.mdx',
+ '../React-Automation-Studio/docs/layout/layoutExamples/BasicGrid.mdx',
+ '../React-Automation-Studio/docs/layout/layoutExamples/Mobile.mdx',
+ '../React-Automation-Studio/docs/WorkingWithLayouts.mdx',
+ '../React-Automation-Studio/docs/themes/themes.mdx',
+ // '../React-Automation-Studio/docs/**/*.mdx',
+ '../React-Automation-Studio/**/*.stories.@(js|jsx|mjs|ts|tsx)',
+ '../React-Automation-Studio/components/CompoundComponents/ArrayContainer.mdx',
+ '../React-Automation-Studio/docs/widget/widget.mdx',
+ '../React-Automation-Studio/components/SystemComponents/Widgets/Widget.stories.js',
+ '../React-Automation-Studio/components/SystemComponents/PV.mdx',
+ '../React-Automation-Studio/components/SystemComponents/EpicsPV.mdx',
+ '../React-Automation-Studio/components/SystemComponents/LocalPV.mdx',
+ '../React-Automation-Studio/components/SystemComponents/Login.mdx',
+ '../React-Automation-Studio/components/SystemComponents/database/MongoDB/MongoDb.mdx',
+ '../React-Automation-Studio/components/SystemComponents/database/MongoDB/useMongoDbDeleteOne.mdx',
+ '../React-Automation-Studio/components/SystemComponents/database/MongoDB/useMongoDbInsertOne.mdx',
+ '../React-Automation-Studio/components/SystemComponents/database/MongoDB/useMongoDbUpdateOne.mdx',
+ '../React-Automation-Studio/components/SystemComponents/database/MongoDB/useMongoDbWatch.mdx',
+ '../React-Automation-Studio/docs/beamlineComponents/BeamlineComponents.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmHandlerTop.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/setup.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/environment.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/emailNotification.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/signalNotification.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/seedData.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/configJson.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/pvListJson.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/Users.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmRoleConfig.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmAdmin.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmUser.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmObserver.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/userGuide.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/implementConventions.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/serverConventions.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/serverLogging.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmNotification.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmSetupMDX.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmAreas.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmTable.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmLog.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/userNotificationMDX.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/alarmUserTable.mdx',
+ '../React-Automation-Studio/docs/alarmHandler/filterPvList.mdx',
+ '../React-Automation-Studio/components/LoadSaveComponent/LoadSave.mdx',
+ '../React-Automation-Studio/components/ArchiverDataViewer/ArchiverDataViewer.mdx',
+ '../React-Automation-Studio/**/**/**/*.stories.@(js|jsx|mjs|ts|tsx)',
+
+],
+ addons: [
+ "@storybook/addon-docs"
+ ],
+ async viteFinal(config, { configType }) {
+ if (configType === 'DEVELOPMENT') {
+ // Your development configuration goes here
+ }
+ if (configType === 'PRODUCTION') {
+ // Your production configuration goes here.
+ }
+ return mergeConfig(config, {
+ // Your environment configuration here
+ });
+ },
+};
\ No newline at end of file
diff --git a/ReactApp/.storybook/preview.tsx b/ReactApp/.storybook/preview.tsx
new file mode 100644
index 0000000..da5bf20
--- /dev/null
+++ b/ReactApp/.storybook/preview.tsx
@@ -0,0 +1,38 @@
+// .storybook/preview.tsx
+import { Preview } from "@storybook/react";
+import Wrapper from "React-Automation-Studio/styleguide/Wrapper";
+import {
+ Title,
+ Subtitle,
+ Description,
+ Primary,
+ Controls,
+ Stories,
+} from "@storybook/blocks";
+import ImportPath from "./ImportPath";
+const preview: Preview = {
+ decorators: [
+ (Story) => (
+
+
+
+ ),
+ ],
+ parameters: {
+ docs: {
+ page: () => (
+ <>
+
+
+
+
+
+
+
+ >
+ ),
+ },
+ },
+};
+
+export default preview;
diff --git a/ReactApp/index.html b/ReactApp/index.html
new file mode 100755
index 0000000..b691e56
--- /dev/null
+++ b/ReactApp/index.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+ React Automation Studio V5.0.0
+
+
+
+
+
+
diff --git a/ReactApp/jsconfig.json b/ReactApp/jsconfig.json
index 5875dc5..7e29db7 100644
--- a/ReactApp/jsconfig.json
+++ b/ReactApp/jsconfig.json
@@ -1,6 +1,9 @@
{
"compilerOptions": {
- "baseUrl": "src"
- },
- "include": ["src"]
+ "paths": {
+ "React-Automation-Studio": [
+ "../submodules/React-Automation-Studio/ReactApp/src"
+ ]
+ }
+ }
}
diff --git a/ReactApp/package.json b/ReactApp/package.json
index df8f294..1672e8c 100644
--- a/ReactApp/package.json
+++ b/ReactApp/package.json
@@ -1,68 +1,74 @@
{
- "name": "react-automation-studio",
- "version": "4.0.3",
- "private": true,
- "dependencies": {
- "@emotion/react": "11.11.1",
- "@emotion/styled": "11.11.0",
- "@mui/icons-material": "5.14.14",
- "@mui/material": "5.14.14",
- "@mui/styles": "5.14.14",
- "@mui/system":"5.14.14",
- "@testing-library/jest-dom": "6.1.4",
- "@testing-library/react": "14.0.0",
- "@testing-library/user-event": "14.5.1",
- "axios": "1.5.1",
- "date-fns": "2.30.0",
- "lodash.debounce": "4.0.8",
- "mathjs": "11.11.2",
- "mdi-material-ui": "7.7.0",
- "plotly.js": "2.26.2",
- "rc-slider": "10.3.1",
- "react": "18.2.0",
- "react-device-detect": "2.2.3",
- "react-dom": "18.2.0",
- "@react-oauth/google":"0.11.1",
- "react-plotly.js": "2.6.0",
- "react-router-dom": "5.3.3",
-
- "socket.io-client": "4.7.2",
- "three": "0.157.0",
- "typeface-roboto": "1.1.13",
- "uuid": "9.0.1",
- "web-vitals": "3.5.0",
- "@mui/x-date-pickers":"6.16.2",
- "@date-io/date-fns": "2.17.0"
- },
- "scripts": {
- "start": "react-scripts start",
- "build": "react-scripts --max_old_space_size=4096 build",
- "test": "react-scripts test",
- "eject": "react-scripts eject",
- "styleguide": "styleguidist server",
- "styleguide:build": "styleguidist build",
- "styleguidebuild": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=4096 GENERATE_SOURCEMAP=false styleguidist build "
- },
- "eslintConfig": {
- "extends": "react-app"
- },
- "browserslist": {
- "production": [
- ">0.2%",
- "not dead",
- "not op_mini all"
- ],
- "development": [
- "last 1 chrome version",
- "last 1 firefox version",
- "last 1 safari version"
- ]
- },
- "homepage": ".",
- "devDependencies": {
- "@babel/plugin-proposal-private-property-in-object":"7.21.11",
- "cross-env": "7.0.3",
- "react-styleguidist": "13.1.1",
- "react-scripts": "5.0.1"
- }
+ "name": "react-automation-studio",
+ "version": "5.0.0",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=4096 vite build",
+ "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
+ "preview": "vite preview",
+ "storybook": "storybook dev -p 6006",
+ "build-storybook": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=4096 storybook build"
+ },
+ "dependencies": {
+ "@date-io/date-fns": "2.17.0",
+ "@emotion/react": "11.11.3",
+ "@emotion/styled": "11.11.0",
+ "@mui/icons-material": "5.15.6",
+ "@mui/material": "5.15.6",
+ "@mui/styles": "5.15.6",
+ "@mui/system": "5.15.6",
+ "@mui/x-date-pickers": "6.19.2",
+ "@react-oauth/google": "0.12.1",
+ "axios": "1.6.7",
+ "date-fns": "2.30.0",
+ "lodash": "4.17.21",
+ "mathjs": "12.3.0",
+ "mdi-material-ui": "7.8.0",
+ "plotly.js": "2.28.0",
+ "rc-slider": "10.5.0",
+ "react": "18.2.0",
+ "react-device-detect": "2.2.3",
+ "react-dom": "18.2.0",
+ "react-plotly.js": "2.6.0",
+ "react-router-dom": "6.21.3",
+ "socket.io-client": "4.7.4",
+ "three": "0.160.1",
+ "@types/three": "0.160.0",
+ "@react-three/fiber": "8.15.14",
+ "typeface-roboto": "1.1.13",
+ "uuid": "9.0.1",
+ "colormap":"2.3.2"
+ },
+ "devDependencies": {
+ "cross-env": "7.0.3",
+ "@storybook/addon-essentials": "7.6.10",
+ "@storybook/addon-interactions": "7.6.10",
+ "@storybook/addon-links": "7.6.10",
+ "@storybook/addon-onboarding": "1.0.10",
+ "@storybook/addon-docs":"7.6.10",
+ "@storybook/blocks": "7.6.10",
+ "@storybook/react": "7.6.10",
+ "@storybook/react-vite": "7.6.10",
+ "@storybook/builder-vite":"7.6.10",
+ "@storybook/testing-library": "0.2.2",
+ "@types/react": "18.2.48",
+ "@types/react-dom": "18.2.18",
+ "@vitejs/plugin-react": "4.2.1",
+ "eslint": "8.56.0",
+ "eslint-plugin-react": "7.33.2",
+ "eslint-plugin-react-hooks": "4.6.0",
+ "eslint-plugin-react-refresh": "0.4.5",
+ "eslint-plugin-storybook": "0.6.15",
+ "prop-types": "15.8.1",
+ "storybook": "7.6.10",
+ "vite": "5.0.12"
+ },
+ "homepage": ".",
+ "eslintConfig": {
+ "extends": [
+ "plugin:storybook/recommended"
+ ]
+ }
}
diff --git a/ReactApp/public/index.html b/ReactApp/public/index.html
deleted file mode 100755
index ffbc134..0000000
--- a/ReactApp/public/index.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- React Automation Studio V4.0.3
-
-
- You need to enable JavaScript to run this app.
-
-
-
-
diff --git a/ReactApp/src/App.js b/ReactApp/src/App.js
deleted file mode 100644
index ffc4e6b..0000000
--- a/ReactApp/src/App.js
+++ /dev/null
@@ -1,17 +0,0 @@
-
-import React from 'react';
-import RasAppCore from 'React-Automation-Studio/components/SystemComponents/RasAppCore';
-import themes from 'React-Automation-Studio/components/UI/Themes/themes';
-import Routes from './Routes';
-
-const App = (props) => {
- return (
-
-
-
- );
-}
-
-
-
-export default App;
diff --git a/ReactApp/src/App.jsx b/ReactApp/src/App.jsx
new file mode 100644
index 0000000..54d9833
--- /dev/null
+++ b/ReactApp/src/App.jsx
@@ -0,0 +1,14 @@
+import React from "react";
+import RasAppCore from "React-Automation-Studio/components/SystemComponents/RasAppCore";
+import themes from "React-Automation-Studio/components/UI/Themes/themes";
+import AppRoutes from "./AppRoutes";
+
+const App = (props) => {
+ return (
+
+
+
+ );
+};
+
+export default App;
diff --git a/ReactApp/src/Main.js b/ReactApp/src/AppMain.jsx
similarity index 79%
rename from ReactApp/src/Main.js
rename to ReactApp/src/AppMain.jsx
index 627b13a..ee3f8d6 100644
--- a/ReactApp/src/Main.js
+++ b/ReactApp/src/AppMain.jsx
@@ -6,13 +6,15 @@ import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import AccountBalanceIcon from '@mui/icons-material/AccountBalance';
-import AutomationStudioContext from './React-Automation-Studio/components/SystemComponents/AutomationStudioContext';
-import AlarmHandler from './React-Automation-Studio/components/AlarmHandler/AlarmHandler'
+import AutomationStudioContext from 'React-Automation-Studio/components/SystemComponents/AutomationStudioContext';
+import AlarmHandler from 'React-Automation-Studio/components/AlarmHandler/AlarmHandler'
const Main = () => {
- let enableDemos = typeof process.env.REACT_APP_DISABLE_DEMOS !== 'undefined' ? !(process.env.REACT_APP_DISABLE_DEMOS.toUpperCase() === 'TRUE') : true;
-
+ let enableDemos =
+ typeof import.meta.env.VITE__DISABLE_DEMOS !== "undefined"
+ ? !(import.meta.env.VITE__DISABLE_DEMOS.toUpperCase() === "TRUE")
+ : true;
const context = useContext(AutomationStudioContext)
const username = useMemo(() => {
diff --git a/ReactApp/src/AppRoutes.jsx b/ReactApp/src/AppRoutes.jsx
new file mode 100644
index 0000000..9b992de
--- /dev/null
+++ b/ReactApp/src/AppRoutes.jsx
@@ -0,0 +1,124 @@
+import React, { useContext } from "react";
+
+import { Route, BrowserRouter, Routes } from "react-router-dom";
+
+/// demos
+import MainDashboard from 'React-Automation-Studio/components/UI/MainDashboard';
+import Vault from 'React-Automation-Studio/components/AlarmHandler/Vault';
+//system
+import Login from "React-Automation-Studio/components/SystemComponents/Login";
+import Probe from "React-Automation-Studio/components/SettingsPages/Probe";
+import Help from "React-Automation-Studio/components/docs/Help";
+import AppMain from "./AppMain";
+import AutomationStudioContext from "React-Automation-Studio/components/SystemComponents/AutomationStudioContext";
+import Administrator from "React-Automation-Studio/components/Administrator/Administrator";
+import UserProfile from "React-Automation-Studio/components/SystemComponents/userProfiles/UserProfile";
+import ProtectedRoute from "React-Automation-Studio/components/SystemComponents/ProtectedRoute";
+
+
+const AppRoutes = (props) => {
+ const context = useContext(AutomationStudioContext);
+ /* eslint-disable-next-line no-unused-vars */
+ const userData = context.userData;
+ /* eslint-disable-next-line no-unused-vars */
+ const roles = context.userData.roles;
+ /* eslint-disable-next-line no-unused-vars */
+ const username = context.userData.username;
+ let enableDemos =
+ typeof import.meta.env.VITE_DISABLE_DEMOS !== "undefined"
+ ? !(import.meta.env.VITE_DISABLE_DEMOS.toUpperCase() === "TRUE")
+ : true;
+
+ return (
+ //For all changes see the migration stragey from V4.0.3 to V5.0.5 in the documentation
+
+
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+ {import.meta.env.VITE__EnableLogin === "true" && (
+ (
+
+ )}
+ />
+ )}
+
+
+
+
+ }
+ />
+ {import.meta.env.VITE_EnableLogin === "true" && (
+ }
+ />
+ )}
+
+
+
+
+ }
+ />
+
+
+
+ }
+ />
+ {/*system end*/}
+
+
+ {enableDemos &&
+
+
+ }
+ />}
+
+
+
+ );
+};
+export default AppRoutes;
diff --git a/ReactApp/src/Routes.js b/ReactApp/src/Routes.js
deleted file mode 100644
index 165da8a..0000000
--- a/ReactApp/src/Routes.js
+++ /dev/null
@@ -1,61 +0,0 @@
-import React, { useContext } from 'react';
-
-import { Route, BrowserRouter, Switch } from 'react-router-dom'
-
-
-// demos
-import MainDashboard from './React-Automation-Studio/components/UI/MainDashboard';
-import Vault from './React-Automation-Studio/components/AlarmHandler/Vault';
-//system
-import Login from "./React-Automation-Studio/components/SystemComponents/Login";
-import Probe from "./React-Automation-Studio/components/SettingsPages/Probe";
-import Help from "./React-Automation-Studio/components/docs/Help";
-import Main from "./Main";
-import AutomationStudioContext from "React-Automation-Studio/components/SystemComponents/AutomationStudioContext";
-import Administrator from "React-Automation-Studio/components/Administrator/Administrator.js";
-import UserProfile from "React-Automation-Studio/components/SystemComponents/userProfiles/UserProfile";
-import ProtectedRoute from "React-Automation-Studio/components/SystemComponents/ProtectedRoute";
-
-const Routes = (props) => {
- const context = useContext(AutomationStudioContext);
- /* eslint-disable-next-line no-unused-vars */
- const userData = context.userData;
- /* eslint-disable-next-line no-unused-vars */
- const roles = context.userData.roles;
-
- return (
-
-
-
-
-
-
- {process.env.REACT_APP_EnableLogin === "true" && (
- (
-
- )}
- />
- )}
-
-
- {/*system end*/}
-
- {/*staging start*/}
-
- {/*staging end*/}
-
-
- );
-};
-export default Routes;
diff --git a/ReactApp/src/components/customComponents/Component1.js b/ReactApp/src/components/customComponents/Component1.jsx
similarity index 100%
rename from ReactApp/src/components/customComponents/Component1.js
rename to ReactApp/src/components/customComponents/Component1.jsx
diff --git a/ReactApp/src/components/customComponents/CustomTextInput.js b/ReactApp/src/components/customComponents/CustomTextInput.jsx
similarity index 100%
rename from ReactApp/src/components/customComponents/CustomTextInput.js
rename to ReactApp/src/components/customComponents/CustomTextInput.jsx
diff --git a/ReactApp/src/components/demos/Demos.js b/ReactApp/src/components/demos/Demos.jsx
similarity index 91%
rename from ReactApp/src/components/demos/Demos.js
rename to ReactApp/src/components/demos/Demos.jsx
index 9c958f9..5dfd03a 100644
--- a/ReactApp/src/components/demos/Demos.js
+++ b/ReactApp/src/components/demos/Demos.jsx
@@ -1,13 +1,10 @@
import React from "react";
import withStyles from "@mui/styles/withStyles";
-import { withRouter } from "react-router-dom";
-
import { Link } from "react-router-dom";
import Button from "@mui/material/Button";
-import RedirectToLogIn from "React-Automation-Studio/components/SystemComponents/RedirectToLogin.js";
-import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout.js";
+import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout";
import Grid from "@mui/material/Grid";
const styles = (theme) => ({
@@ -39,10 +36,10 @@ if (typeof process.env.pvServerURL === "undefined") {
}
let port;
-if (typeof process.env.REACT_APP_StyleguideServerPORT === "undefined") {
+if (typeof import.meta.env.VITE__StyleguideServerPORT === "undefined") {
port = 6060;
} else {
- port = process.env.REACT_APP_StyleguideServerPORT;
+ port = import.meta.env.VITE__StyleguideServerPORT;
}
let AutomationStudioStyleGuideBuildURL = pvServerBASEURL + ":" + port;
@@ -56,7 +53,6 @@ const Demos = (props) => {
denseAppBar
alignTitle="center"
>
-
{
);
};
-export default withRouter(withStyles(styles)(Demos));
+export default withStyles(styles)(Demos);
diff --git a/ReactApp/src/components/staging/Example/Example.js b/ReactApp/src/components/staging/Example/Example.jsx
similarity index 89%
rename from ReactApp/src/components/staging/Example/Example.js
rename to ReactApp/src/components/staging/Example/Example.jsx
index b72a25c..ad0a67e 100644
--- a/ReactApp/src/components/staging/Example/Example.js
+++ b/ReactApp/src/components/staging/Example/Example.jsx
@@ -1,13 +1,11 @@
import React from "react";
import withStyles from "@mui/styles/withStyles";
-import { withRouter } from "react-router-dom";
import { Link } from "react-router-dom";
import Button from "@mui/material/Button";
-import RedirectToLogIn from "React-Automation-Studio/components/SystemComponents/RedirectToLogin.js";
-import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout.js";
+import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout";
import Grid from "@mui/material/Grid";
const styles = (theme) => ({
@@ -40,7 +38,6 @@ const Example = (props) => {
denseAppBar
alignTitle="center"
>
-
{
);
};
-export default withRouter(withStyles(styles)(Example));
+export default withStyles(styles)(Example);
diff --git a/ReactApp/src/components/staging/Example/Example1.js b/ReactApp/src/components/staging/Example/Example1.jsx
similarity index 99%
rename from ReactApp/src/components/staging/Example/Example1.js
rename to ReactApp/src/components/staging/Example/Example1.jsx
index f841d68..dceed86 100644
--- a/ReactApp/src/components/staging/Example/Example1.js
+++ b/ReactApp/src/components/staging/Example/Example1.jsx
@@ -17,7 +17,7 @@ import AccountCircle from "@mui/icons-material/AccountCircleOutlined";
import Settings from "@mui/icons-material/SettingsOutlined";
import Divider from "@mui/material/Divider";
import StyledIconIndicator from "React-Automation-Studio/components/BaseComponents/StyledIconIndicator";
-import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout.js";
+import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout";
import { useLocalPV } from "React-Automation-Studio/components/SystemComponents/LocalPV";
// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
diff --git a/ReactApp/src/components/staging/Example/Example2.js b/ReactApp/src/components/staging/Example/Example2.jsx
similarity index 82%
rename from ReactApp/src/components/staging/Example/Example2.js
rename to ReactApp/src/components/staging/Example/Example2.jsx
index 4444ab2..67670fd 100644
--- a/ReactApp/src/components/staging/Example/Example2.js
+++ b/ReactApp/src/components/staging/Example/Example2.jsx
@@ -2,10 +2,9 @@ import React from "react";
import withStyles from "@mui/styles/withStyles";
-import RedirectToLogIn from "React-Automation-Studio/components/SystemComponents/RedirectToLogin.js";
-import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout.js";
-import CustomTextInput from "components/customComponents/CustomTextInput";
+import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout";
+import CustomTextInput from "../../../components/customComponents/CustomTextInput";
const styles = (theme) => ({
root: {
@@ -35,7 +34,6 @@ const Example2 = (props) => {
denseAppBar
alignTitle="center"
>
-
This example imports the site specific custom TextInput in the
diff --git a/ReactApp/src/components/staging/Example/Example3.js b/ReactApp/src/components/staging/Example/Example3.jsx
similarity index 81%
rename from ReactApp/src/components/staging/Example/Example3.js
rename to ReactApp/src/components/staging/Example/Example3.jsx
index 27b30e5..9d09327 100644
--- a/ReactApp/src/components/staging/Example/Example3.js
+++ b/ReactApp/src/components/staging/Example/Example3.jsx
@@ -2,9 +2,8 @@ import React from "react";
import withStyles from "@mui/styles/withStyles";
-import RedirectToLogIn from "React-Automation-Studio/components/SystemComponents/RedirectToLogin.js";
-import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout.js";
+import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout";
const styles = (theme) => ({
root: {
@@ -30,7 +29,6 @@ const styles = (theme) => ({
const Example3 = (props) => {
return (
-
Hello World
);
diff --git a/ReactApp/src/components/staging/Staging.js b/ReactApp/src/components/staging/Staging.jsx
similarity index 86%
rename from ReactApp/src/components/staging/Staging.js
rename to ReactApp/src/components/staging/Staging.jsx
index 1bf2ba7..a85f0ac 100644
--- a/ReactApp/src/components/staging/Staging.js
+++ b/ReactApp/src/components/staging/Staging.jsx
@@ -1,13 +1,11 @@
import React from "react";
import withStyles from "@mui/styles/withStyles";
-import { withRouter } from "react-router-dom";
import { Link } from "react-router-dom";
import Button from "@mui/material/Button";
-import RedirectToLogIn from "React-Automation-Studio/components/SystemComponents/RedirectToLogin.js";
-import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout.js";
+import TraditionalLayout from "React-Automation-Studio/components/UI/Layout/ComposedLayouts/TraditionalLayout";
import Grid from "@mui/material/Grid";
const styles = (theme) => ({
@@ -40,7 +38,6 @@ const Staging = (props) => {
denseAppBar
alignTitle="center"
>
-
{
);
};
-export default withRouter(withStyles(styles)(Staging));
+export default withStyles(styles)(Staging);
diff --git a/ReactApp/src/index.js b/ReactApp/src/index.js
deleted file mode 100755
index 6ed9913..0000000
--- a/ReactApp/src/index.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom/client';
-import './index.css';
-import App from './App';
-import * as serviceWorker from './serviceWorker';
-import reportWebVitals from './reportWebVitals';
-
-const root = ReactDOM.createRoot(document.getElementById('root'));
-root.render(
-
- // Strict mode should be permanently enabled once all code conversion to React 18.2 is complete
- //
-
- //
-);
-
-// If you want to start measuring performance in your app, pass a function
-// to log results (for example: reportWebVitals(console.log))
-// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
-reportWebVitals();
-
-// If you want your app to work offline and load faster, you can change
-// unregister() to register() below. Note this comes with some pitfalls.
-// Learn more about service workers: http://bit.ly/CRA-PWA
-
-switch(process.env.NODE_ENV){
- case 'production':
- if(typeof process.env.REACT_APP_PyEpicsServerURL==='undefined'){
- serviceWorker.unregister();
- }
- else{
- serviceWorker.unregister();
- }
- break;
- case 'development':
- serviceWorker.unregister();
- break;
- case 'test':
- serviceWorker.unregister();
- break;
- default:
- // do nothing
-}
diff --git a/ReactApp/src/main.jsx b/ReactApp/src/main.jsx
new file mode 100755
index 0000000..a24e4cf
--- /dev/null
+++ b/ReactApp/src/main.jsx
@@ -0,0 +1,43 @@
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import App from './App';
+// import * as serviceWorker from './serviceWorker';
+// import reportWebVitals from './reportWebVitals';
+
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
+
+ // Strict mode should be permanently enabled once all code conversion to React 18.2 is complete
+ //
+
+ //
+);
+
+// If you want to start measuring performance in your app, pass a function
+// to log results (for example: reportWebVitals(console.log))
+// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
+// reportWebVitals();
+
+// // If you want your app to work offline and load faster, you can change
+// // unregister() to register() below. Note this comes with some pitfalls.
+// // Learn more about service workers: http://bit.ly/CRA-PWA
+
+// switch(process.env.NODE_ENV){
+// case 'production':
+// if(typeof process.env.VITE_PyEpicsServerURL==='undefined'){
+// serviceWorker.unregister();
+// }
+// else{
+// serviceWorker.unregister();
+// }
+// break;
+// case 'development':
+// serviceWorker.unregister();
+// break;
+// case 'test':
+// serviceWorker.unregister();
+// break;
+// default:
+ // do nothing
+// }
diff --git a/ReactApp/vite.config.js b/ReactApp/vite.config.js
new file mode 100644
index 0000000..074f4f1
--- /dev/null
+++ b/ReactApp/vite.config.js
@@ -0,0 +1,16 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+import { resolve, dirname } from "node:path";
+export default defineConfig({
+ plugins: [react()],
+ resolve: {
+ alias: [{ find: "React-Automation-Studio", replacement: resolve(__dirname, "./React-Automation-Studio") }]
+ },
+ server: {
+ port: 3000,
+ hmr:{
+ path:"ws"
+ }
+ },
+
+})
diff --git a/docker-compose-dev-styleguide-dev.yml b/docker-compose-dev-styleguide-dev.yml
index 0244bb3..8910f53 100644
--- a/docker-compose-dev-styleguide-dev.yml
+++ b/docker-compose-dev-styleguide-dev.yml
@@ -1,32 +1,35 @@
-version: '3.2'
services:
+ epicsbase:
+ image: epicsbase
+ build:
+ context: ./
+ dockerfile: docker/epicsBase/Dockerfile
+ node_cache:
+ image: node_cache
+ build:
+ context: ./
+ dockerfile: docker/node_cache/Dockerfile
frontendserverdev:
env_file: .env
build:
context: ./
dockerfile: docker/frontendserverDev/Dockerfile
volumes:
-
- - ./certificates:/certificates/
- - ./ReactApp/jsconfig.json:/frontendserverAppDev/jsconfig.json
- - ./ReactApp/package.json:/frontendserverAppDev/package.json
- - ./ReactApp/src/components:/frontendserverAppDev/src/components
- - ./ReactApp/src/App.js:/frontendserverAppDev/src/App.js
- - ./ReactApp/src/index.css:/frontendserverAppDev/src/index.css
- - ./ReactApp/src/index.js:/frontendserverAppDev/src/index.js
- - ./ReactApp/src/Main.js:/frontendserverAppDev/src/Main.js
- - ./ReactApp/src/Routes.js:/frontendserverAppDev/src/Routes.js
- - ./ReactApp/src/serviceWorker.js:/frontendserverAppDev/src/serviceWorker.js
- - ./ReactApp/src/reportWebVitals.js:/frontendserverAppDev/src/reportWebVitals.js
- - ./submodules/React-Automation-Studio/ReactApp/src:/frontendserverAppDev/src/React-Automation-Studio/
- - ./ReactApp/public:/frontendserverAppDev/public
+ # mount ReactApp folder contents to ReactApp folder
+ - ./ReactApp/package.json:/ReactApp/package.json
+ - ./ReactApp/src:/ReactApp/src
+ - ./ReactApp/public:/ReactApp/public
+ - ./ReactApp/vite.config.js:/ReactApp/vite.config.js
+ - ./ReactApp/index.html:/ReactApp/index.html
+ # mount React-Automation-Studio submoule ReactApp folder contents to ReactApp folder
+ - ./submodules/React-Automation-Studio/ReactApp/src:/ReactApp/React-Automation-Studio/
restart: always
- #network_mode: host
ports:
- "3001:3000"
environment:
- - FAST_REFRESH=false
- NODE_OPTIONS=--max_old_space_size=4096
+ depends_on:
+ - node_cache
pvserver1:
build:
@@ -54,8 +57,10 @@ services:
- ./users:/pvServer/userAuthentication/users
- ./log/:/pvServer/log
- ./build:/pvServer/build
+ depends_on:
+ - epicsbase
nginx:
- image: nginx:1.19.6
+ image: nginx:1.25.3
restart: always
network_mode: host
depends_on:
@@ -63,7 +68,7 @@ services:
entrypoint:
- /custom/setupNginx.styleguide.dev.sh
- /docker-entrypoint.sh
- command: ["nginx", "-g", "daemon off;"]
+ command: ["nginx", "-g", "daemon off;"]
volumes:
- ./submodules/React-Automation-Studio/nginx/setupNginx.styleguide.dev.sh:/custom/setupNginx.styleguide.dev.sh
- ./submodules/React-Automation-Studio/nginx/nginx.styleguide.dev.conf:/custom/nginx.styleguide.dev.conf
@@ -71,55 +76,61 @@ services:
- ./build/styleguide:/var/www/styleguide
- ./certificates:/etc/nginx/certificates
env_file: .env
-
+
stagingunsecurestylguidepvserver:
- env_file: .env
- environment:
- - pvServerURL=http://127.0.0.1
- - pvServerPort=5001
- - REACT_APP_EnableLogin=false
- - DEMO_ARCHIVER=http://localhost:17668
build:
context: ./
dockerfile: docker/pvserver/Dockerfile
restart: always
network_mode: host
+ env_file: .env
+ environment:
+ - ALARM_DATABASE=localhost
+ - ALARM_DATABASE_REPLICA_SET_NAME=devrs
+ - LOADSAVE_DATABASE=localhost
+ - LOADSAVE_DATABASE_REPLICA_SET_NAME=devrs
+ - ADMIN_DATABASE=localhost
+ - ADMIN_DATABASE_REPLICA_SET_NAME=devrs
+ - WATCH_DEBUG_DATABASE=localhost
+ - WATCH_DEBUG_DATABASE_REPLICA_SET_NAME=devrs
+ - DEMO_ARCHIVER=http://localhost:17668
+ - pvServerURL=http://127.0.0.1
+ - pvServerPort=5001
+ - VITE_EnableLogin=false
volumes:
- ./certificates:/certificates/
+ depends_on:
+ - epicsbase
stagingdemoioc:
build:
- context: ./
+ context: ./
dockerfile: docker/demoioc/Dockerfile
tty: true
stdin_open: true
restart: always
network_mode: host
+ depends_on:
+ - epicsbase
stagingtestioc:
- build:
- context: ./
- dockerfile: docker/stagingioc/Dockerfile
- tty: true
- stdin_open: true
- restart: always
- network_mode: host
-
- styleguideserverdev:
- env_file: .env
build:
context: ./
- dockerfile: docker/styleguideServerDev/Dockerfile
- volumes:
-
- - ./ReactApp/src/components:/app/src/components
- - ./ReactApp/src/docs:/app/src/docs
- - ./ReactApp/styleguide.config.js:/app/styleguide.config.js
+ dockerfile: docker/stagingioc/Dockerfile
+ tty: true
+ stdin_open: true
restart: always
- ports:
- - "6061:6060"
+ network_mode: host
+ depends_on:
+ - epicsbase
+
+ # As of RAS V5.0.0 MongoDB the mongodb version is now defined by the RAS_MONGODB_VERSION variable in the .env file
+ # This allows you customize the mongodb version, for example should you want to stay on an older version of mongodb
+
+ # In the volumes section, the mogodb volumes are now defined by the compose project name and mongodb version
+ # It allows for multiple RAS instances to be run on the same machine.
+ # In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file or make sure project folder names are unique between instances
- ## ALL Database related Docker processes -start
mongo1:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo1
restart: always
network_mode: "host"
@@ -135,7 +146,7 @@ services:
command: "--bind_ip_all --port 27017 --replSet ${REPLICA_SET_NAME-devrs}"
mongo2:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo2
restart: always
network_mode: "host"
@@ -151,7 +162,7 @@ services:
command: "--bind_ip_all --port 27018 --replSet ${REPLICA_SET_NAME-devrs}"
mongo3:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo3
restart: always
network_mode: "host"
@@ -188,13 +199,32 @@ services:
build:
context: ./
-
dockerfile: docker/loadSaveDbInit/Dockerfile
network_mode: "host"
tty: true
stdin_open: true
depends_on:
- mongosetup
+
+ storybookserverdev:
+ env_file: .env
+ build:
+ context: ./
+
+ dockerfile: docker/storybookServerDev/Dockerfile
+ volumes:
+ - ./ReactApp/src:/ReactApp/src
+ - ./submodules/React-Automation-Studio/ReactApp/src:/ReactApp/React-Automation-Studio/
+ - ./ReactApp/public:/ReactApp/public
+ - ./ReactApp/vite.config.js:/ReactApp/vite.config.js
+ - ./ReactApp/index.html:/ReactApp/index.html
+ - ./ReactApp/.storybook:/ReactApp/.storybook
+ restart: always
+ ports:
+ - "6061:6006"
+ depends_on:
+ - node_cache
+
initializealarmhandlerdb:
build:
context: ./
@@ -215,6 +245,7 @@ services:
restart: always
depends_on:
- initializealarmhandlerdb
+ - epicsbase
network_mode: "host"
stdin_open: true
tty: true
@@ -227,7 +258,7 @@ services:
- ADMIN_DATABASE=localhost
- ADMIN_DATABASE_REPLICA_SET_NAME=devrs
build:
- context: ./
+ context: ./
dockerfile: ./submodules/React-Automation-Studio/docker/adminDbInit/Dockerfile
network_mode: "host"
tty: true
@@ -246,12 +277,31 @@ services:
env_file: .env
volumes:
- "./signalcli/signal-cli-config:/srv/signal/.local/share/signal-cli"
+ areadetectorsim:
+ image: prjemian/synapps
+ ports:
+ - "8005:8005/tcp" #areaDetector IOC is served on port 8005 so as not to conflict with other instances on the network, use the port number to access the IOC from other GUIS
+ - "8005:8005/udp"
+ environment:
+ - PREFIX="ras:adsim:" # OPI macro: P = ras:adsim: , R = cam1:
+ - EPICS_CA_SERVER_PORT=8005
+ command: bash -c "/root/bin/adsim.sh start && tail -f /dev/null"
+
+# As of RAS V5.0.0 MongoDB volumes are now defined by the compose project name and mongodb version
+# This allows you customize the mongodb version, for example should you want to stay on an older version of mongodb
+# It allows for multiple RAS instances to be run on the same machine.
+# In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file or make sure project folder names are unique between instances
volumes:
mongo-db-data1:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data1-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb1:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb1-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-data2:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data2-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb2:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb2-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-data3:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data3-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb3:
-## ALL Database related Docker processes -end
\ No newline at end of file
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb3-mongo-${RAS_MONGODB_VERSION-7.0.5}
diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml
index 89a8086..2de833b 100644
--- a/docker-compose-dev.yml
+++ b/docker-compose-dev.yml
@@ -1,32 +1,35 @@
-version: '3.2'
services:
+ epicsbase:
+ image: epicsbase
+ build:
+ context: ./
+ dockerfile: docker/epicsBase/Dockerfile
+ node_cache:
+ image: node_cache
+ build:
+ context: ./
+ dockerfile: docker/node_cache/Dockerfile
frontendserverdev:
env_file: .env
build:
context: ./
dockerfile: docker/frontendserverDev/Dockerfile
volumes:
-
- - ./certificates:/certificates/
- - ./ReactApp/jsconfig.json:/frontendserverAppDev/jsconfig.json
- - ./ReactApp/package.json:/frontendserverAppDev/package.json
- - ./ReactApp/src/components:/frontendserverAppDev/src/components
- - ./ReactApp/src/App.js:/frontendserverAppDev/src/App.js
- - ./ReactApp/src/index.css:/frontendserverAppDev/src/index.css
- - ./ReactApp/src/index.js:/frontendserverAppDev/src/index.js
- - ./ReactApp/src/Main.js:/frontendserverAppDev/src/Main.js
- - ./ReactApp/src/Routes.js:/frontendserverAppDev/src/Routes.js
- - ./ReactApp/src/serviceWorker.js:/frontendserverAppDev/src/serviceWorker.js
- - ./ReactApp/src/reportWebVitals.js:/frontendserverAppDev/src/reportWebVitals.js
- - ./submodules/React-Automation-Studio/ReactApp/src:/frontendserverAppDev/src/React-Automation-Studio/
- - ./ReactApp/public:/frontendserverAppDev/public
+ # mount ReactApp folder contents to ReactApp folder
+ - ./ReactApp/package.json:/ReactApp/package.json
+ - ./ReactApp/src:/ReactApp/src
+ - ./ReactApp/public:/ReactApp/public
+ - ./ReactApp/vite.config.js:/ReactApp/vite.config.js
+ - ./ReactApp/index.html:/ReactApp/index.html
+ # mount React-Automation-Studio submoule ReactApp folder contents to ReactApp folder
+ - ./submodules/React-Automation-Studio/ReactApp/src:/ReactApp/React-Automation-Studio/
restart: always
- #network_mode: host
ports:
- "3001:3000"
environment:
- - FAST_REFRESH=false
- NODE_OPTIONS=--max_old_space_size=4096
+ depends_on:
+ - node_cache
pvserver1:
build:
context: ./
@@ -53,8 +56,10 @@ services:
- ./users:/pvServer/userAuthentication/users
- ./log/:/pvServer/log
- ./build:/pvServer/build
+ depends_on:
+ - epicsbase
nginx:
- image: nginx:1.19.6
+ image: nginx:1.25.3
restart: always
network_mode: host
depends_on:
@@ -62,7 +67,7 @@ services:
entrypoint:
- /custom/setupNginx.dev.sh
- /docker-entrypoint.sh
- command: ["nginx", "-g", "daemon off;"]
+ command: ["nginx", "-g", "daemon off;"]
volumes:
- ./submodules/React-Automation-Studio/nginx/setupNginx.dev.sh:/custom/setupNginx.dev.sh
- ./submodules/React-Automation-Studio/nginx/nginx.dev.conf:/custom/nginx.dev.conf
@@ -70,21 +75,31 @@ services:
- ./build/styleguide:/var/www/styleguide
- ./certificates:/etc/nginx/certificates
env_file: .env
-
+
stagingunsecurestylguidepvserver:
- env_file: .env
- environment:
- - pvServerURL=http://127.0.0.1
- - pvServerPort=5001
- - REACT_APP_EnableLogin=false
- - DEMO_ARCHIVER=http://localhost:17668
build:
context: ./
dockerfile: docker/pvserver/Dockerfile
restart: always
network_mode: host
+ env_file: .env
+ environment:
+ - ALARM_DATABASE=localhost
+ - ALARM_DATABASE_REPLICA_SET_NAME=devrs
+ - LOADSAVE_DATABASE=localhost
+ - LOADSAVE_DATABASE_REPLICA_SET_NAME=devrs
+ - ADMIN_DATABASE=localhost
+ - ADMIN_DATABASE_REPLICA_SET_NAME=devrs
+ - WATCH_DEBUG_DATABASE=localhost
+ - WATCH_DEBUG_DATABASE_REPLICA_SET_NAME=devrs
+ - DEMO_ARCHIVER=http://localhost:17668
+ - pvServerURL=http://127.0.0.1
+ - pvServerPort=5001
+ - VITE_EnableLogin=false
volumes:
- ./certificates:/certificates/
+ depends_on:
+ - epicsbase
stagingdemoioc:
build:
context: ./
@@ -93,31 +108,45 @@ services:
stdin_open: true
restart: always
network_mode: host
- styleguide:
+ depends_on:
+ - epicsbase
+
+ storybook:
build:
context: ./
- dockerfile: docker/styleguide/Dockerfile
+ dockerfile: docker/storybook/Dockerfile
env_file: .env
environment:
- - pvServerPort=5001
- - REACT_APP_EnableLogin=false
+ - pvServerPort=5001
+ - VITE_EnableLogin=false
volumes:
- ./build/styleguide:/build/
+ depends_on:
+ - node_cache
stagingtestioc:
- build:
- context: ./
- args: # Environment variables available at build-time
- - http_proxy
- - https_proxy
- - no_proxy
- dockerfile: docker/stagingioc/Dockerfile
- tty: true
- stdin_open: true
- restart: always
- network_mode: host
- ## ALL Database related Docker processes -start
+ build:
+ context: ./
+ args: # Environment variables available at build-time
+ - http_proxy
+ - https_proxy
+ - no_proxy
+ dockerfile: docker/stagingioc/Dockerfile
+ tty: true
+ stdin_open: true
+ restart: always
+ network_mode: host
+ depends_on:
+ - epicsbase
+
+ # As of RAS V5.0.0 MongoDB the mongodb version is now defined by the RAS_MONGODB_VERSION variable in the .env file
+ # This allows you customize the mongodb version, for example should you want to stay on an older version of mongodb
+
+ # In the volumes section, the mogodb volumes are now defined by the compose project name and mongodb version
+ # It allows for multiple RAS instances to be run on the same machine.
+ # In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file or make sure project folder names are unique between instances
+
mongo1:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo1
restart: always
network_mode: "host"
@@ -133,7 +162,7 @@ services:
command: "--bind_ip_all --port 27017 --replSet ${REPLICA_SET_NAME-devrs}"
mongo2:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo2
restart: always
network_mode: "host"
@@ -149,7 +178,7 @@ services:
command: "--bind_ip_all --port 27018 --replSet ${REPLICA_SET_NAME-devrs}"
mongo3:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo3
restart: always
network_mode: "host"
@@ -186,7 +215,6 @@ services:
build:
context: ./
-
dockerfile: docker/loadSaveDbInit/Dockerfile
network_mode: "host"
tty: true
@@ -213,19 +241,20 @@ services:
restart: always
depends_on:
- initializealarmhandlerdb
+ - epicsbase
network_mode: "host"
stdin_open: true
tty: true
env_file: .env
volumes:
- - ./log/:/usr/src/app/log
+ - ./log/:/usr/src/app/log
initializeadmindb:
env_file: .env
environment:
- ADMIN_DATABASE=localhost
- ADMIN_DATABASE_REPLICA_SET_NAME=devrs
build:
- context: ./
+ context: ./
dockerfile: ./submodules/React-Automation-Studio/docker/adminDbInit/Dockerfile
network_mode: "host"
tty: true
@@ -244,12 +273,31 @@ services:
env_file: .env
volumes:
- "./signalcli/signal-cli-config:/srv/signal/.local/share/signal-cli"
+ areadetectorsim:
+ image: prjemian/synapps
+ ports:
+ - "8005:8005/tcp" #areaDetector IOC is served on port 8005 so as not to conflict with other instances on the network, use the port number to access the IOC from other GUIS
+ - "8005:8005/udp"
+ environment:
+ - PREFIX="ras:adsim:" # OPI macro: P = ras:adsim: , R = cam1:
+ - EPICS_CA_SERVER_PORT=8005
+ command: bash -c "/root/bin/adsim.sh start && tail -f /dev/null"
+
+# As of RAS V5.0.0 MongoDB volumes are now defined by the compose project name and mongodb version
+# This allows you customize the mongodb version, for example should you want to stay on an older version of mongodb
+# It allows for multiple RAS instances to be run on the same machine.
+# In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file or make sure project folder names are unique between instances
volumes:
mongo-db-data1:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data1-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb1:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb1-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-data2:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data2-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb2:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb2-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-data3:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data3-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb3:
-## ALL Database related Docker processes -end
\ No newline at end of file
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb3-mongo-${RAS_MONGODB_VERSION-7.0.5}
diff --git a/docker-compose-prod-with-demoioc.yml b/docker-compose-prod-with-demoioc.yml
index 829f6d3..b0f54ca 100644
--- a/docker-compose-prod-with-demoioc.yml
+++ b/docker-compose-prod-with-demoioc.yml
@@ -1,5 +1,14 @@
-version: '3.4'
services:
+ epicsbase:
+ image: epicsbase
+ build:
+ context: ./
+ dockerfile: docker/epicsBase/Dockerfile
+ node_cache:
+ image: node_cache
+ build:
+ context: ./
+ dockerfile: docker/node_cache/Dockerfile
frontend:
build:
context: ./
@@ -11,6 +20,8 @@ services:
#restart: always
network_mode: host
env_file: .env
+ depends_on:
+ - node_cache
pvserver1:
build:
@@ -38,6 +49,8 @@ services:
- ./users:/pvServer/userAuthentication/users
- ./log/:/pvServer/log
- ./build:/pvServer/build
+ depends_on:
+ - epicsbase
pvserver2:
build:
context: ./
@@ -64,6 +77,8 @@ services:
- ./users:/pvServer/userAuthentication/users
- ./log/:/pvServer/log
- ./build:/pvServer/build
+ depends_on:
+ - epicsbase
pvserver3:
build:
context: ./
@@ -90,8 +105,10 @@ services:
- ./users:/pvServer/userAuthentication/users
- ./log/:/pvServer/log
- ./build:/pvServer/build
+ depends_on:
+ - epicsbase
nginx:
- image: nginx:1.19.6
+ image: nginx:1.25.3
restart: always
network_mode: host
depends_on:
@@ -101,7 +118,7 @@ services:
entrypoint:
- /custom/setupNginx.sh
- /docker-entrypoint.sh
- command: ["nginx", "-g", "daemon off;"]
+ command: ["nginx", "-g", "daemon off;"]
volumes:
- ./submodules/React-Automation-Studio/nginx/setupNginx.sh:/custom/setupNginx.sh
- ./submodules/React-Automation-Studio/nginx/nginx.production.conf:/custom/nginx.production.conf
@@ -112,21 +129,31 @@ services:
environment:
- SERVER_PORT=${SERVER_PORT-5000}
env_file: .env
-
+
stagingunsecurestylguidepvserver:
- env_file: .env
- environment:
- - pvServerURL=http://127.0.0.1
- - pvServerPort=5001
- - REACT_APP_EnableLogin=false
- - DEMO_ARCHIVER=http://localhost:17668
build:
context: ./
dockerfile: docker/pvserver/Dockerfile
restart: always
network_mode: host
+ env_file: .env
+ environment:
+ - ALARM_DATABASE=localhost
+ - ALARM_DATABASE_REPLICA_SET_NAME=devrs
+ - LOADSAVE_DATABASE=localhost
+ - LOADSAVE_DATABASE_REPLICA_SET_NAME=devrs
+ - ADMIN_DATABASE=localhost
+ - ADMIN_DATABASE_REPLICA_SET_NAME=devrs
+ - WATCH_DEBUG_DATABASE=localhost
+ - WATCH_DEBUG_DATABASE_REPLICA_SET_NAME=devrs
+ - DEMO_ARCHIVER=http://localhost:17668
+ - pvServerURL=http://127.0.0.1
+ - pvServerPort=5001
+ - VITE_EnableLogin=false
volumes:
- ./certificates:/certificates/
+ depends_on:
+ - epicsbase
stagingdemoioc:
build:
context: ./
@@ -135,31 +162,86 @@ services:
stdin_open: true
restart: always
network_mode: host
- styleguide:
+ depends_on:
+ - epicsbase
+ storybook:
build:
context: ./
- dockerfile: docker/styleguide/Dockerfile
+ dockerfile: docker/storybook/Dockerfile
env_file: .env
environment:
- - pvServerPort=5001
- - REACT_APP_EnableLogin=false
+ - pvServerPort=5001
+ - VITE_EnableLogin=false
volumes:
- ./build/styleguide:/build/
+ depends_on:
+ - node_cache
stagingtestioc:
- build:
- context: ./
- args: # Environment variables available at build-time
- - http_proxy
- - https_proxy
- - no_proxy
- dockerfile: docker/stagingioc/Dockerfile
- tty: true
- stdin_open: true
- restart: always
- network_mode: host
- ## ALL Database related Docker processes -start
+ build:
+ context: ./
+ args: # Environment variables available at build-time
+ - http_proxy
+ - https_proxy
+ - no_proxy
+ dockerfile: docker/stagingioc/Dockerfile
+ tty: true
+ stdin_open: true
+ restart: always
+ network_mode: host
+ depends_on:
+ - epicsbase
+
+ alarmhandlerserver:
+ build:
+ context: ./submodules/React-Automation-Studio/
+ dockerfile: docker/alarmHandlerServer/Dockerfile
+ hostname: alarmhandlerserver
+ restart: always
+ depends_on:
+ - epicsbase
+ - initializealarmhandlerdb
+ network_mode: "host"
+ stdin_open: true
+ tty: true
+ env_file: .env
+ volumes:
+ - ./log/:/usr/src/app/log
+
+ initializeadmindb:
+ env_file: .env
+ environment:
+ - ADMIN_DATABASE=localhost
+ - ADMIN_DATABASE_REPLICA_SET_NAME=devrs
+ build:
+ context: ./
+ dockerfile: ./submodules/React-Automation-Studio/docker/adminDbInit/Dockerfile
+ network_mode: "host"
+ tty: true
+ stdin_open: true
+ depends_on:
+ - mongosetup
+ signalcli:
+ build:
+ context: ./submodules/React-Automation-Studio/
+ dockerfile: docker/signalcli/Dockerfile
+ hostname: signalcli
+ restart: always
+ network_mode: "host"
+ stdin_open: true
+ tty: true
+ env_file: .env
+ volumes:
+ - "./signalcli/signal-cli-config:/srv/signal/.local/share/signal-cli"
+
+ # As of RAS V5.0.0 MongoDB the mongodb version is now defined by the RAS_MONGODB_VERSION variable in the .env file
+ # This allows you customize the mongodb version, for example should you want to stay on an older version of mongodb
+
+ # In the volumes section, the mogodb volumes are now defined by the compose project name and mongodb version
+ # It allows for multiple RAS instances to be run on the same machine.
+ # In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file or make sure project folder names are unique between instances
+
mongo1:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo1
restart: always
network_mode: "host"
@@ -175,7 +257,7 @@ services:
command: "--bind_ip_all --port 27017 --replSet ${REPLICA_SET_NAME-devrs}"
mongo2:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo2
restart: always
network_mode: "host"
@@ -191,7 +273,7 @@ services:
command: "--bind_ip_all --port 27018 --replSet ${REPLICA_SET_NAME-devrs}"
mongo3:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo3
restart: always
network_mode: "host"
@@ -228,7 +310,6 @@ services:
build:
context: ./
-
dockerfile: docker/loadSaveDbInit/Dockerfile
network_mode: "host"
tty: true
@@ -247,51 +328,30 @@ services:
stdin_open: true
tty: true
env_file: .env
- alarmhandlerserver:
- build:
- context: ./submodules/React-Automation-Studio/
- dockerfile: docker/alarmHandlerServer/Dockerfile
- hostname: alarmhandlerserver
- restart: always
- depends_on:
- - initializealarmhandlerdb
- network_mode: "host"
- stdin_open: true
- tty: true
- env_file: .env
- volumes:
- - ./log/:/usr/src/app/log
- initializeadmindb:
- env_file: .env
+ areadetectorsim:
+ image: prjemian/synapps
+ ports:
+ - "8005:8005/tcp" #areaDetector IOC is served on port 8005 so as not to conflict with other instances on the network, use the port number to access the IOC from other GUIS
+ - "8005:8005/udp"
environment:
- - ADMIN_DATABASE=localhost
- - ADMIN_DATABASE_REPLICA_SET_NAME=devrs
- build:
- context: ./
- dockerfile: ./submodules/React-Automation-Studio/docker/adminDbInit/Dockerfile
- network_mode: "host"
- tty: true
- stdin_open: true
- depends_on:
- - mongosetup
- signalcli:
- build:
- context: ./submodules/React-Automation-Studio/
- dockerfile: docker/signalcli/Dockerfile
- hostname: signalcli
- restart: always
- network_mode: "host"
- stdin_open: true
- tty: true
- env_file: .env
- volumes:
- - "./signalcli/signal-cli-config:/srv/signal/.local/share/signal-cli"
+ - PREFIX="ras:adsim:" # OPI macro: P = ras:adsim: , R = cam1:
+ - EPICS_CA_SERVER_PORT=8005
+ command: bash -c "/root/bin/adsim.sh start && tail -f /dev/null"
+# As of RAS V5.0.0 MongoDB volumes are now defined by the compose project name and mongodb version
+# This allows you customize the mongodb version, for example should you want to stay on an older version of mongodb
+# It allows for multiple RAS instances to be run on the same machine.
+# In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file or make sure project folder names are unique between instances
volumes:
mongo-db-data1:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data1-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb1:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb1-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-data2:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data2-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb2:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb2-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-data3:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data3-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb3:
-## ALL Database related Docker processes -end
\ No newline at end of file
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb3-mongo-${RAS_MONGODB_VERSION-7.0.5}
diff --git a/docker-compose.yml b/docker-compose.yml
index 4eda466..1e246da 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,5 +1,14 @@
-version: '3.4'
services:
+ epicsbase:
+ image: epicsbase
+ build:
+ context: ./
+ dockerfile: docker/epicsBase/Dockerfile
+ node_cache:
+ image: node_cache
+ build:
+ context: ./
+ dockerfile: docker/node_cache/Dockerfile
frontend:
build:
context: ./
@@ -11,6 +20,8 @@ services:
#restart: always
network_mode: host
env_file: .env
+ depends_on:
+ - node_cache
pvserver1:
build:
@@ -38,6 +49,8 @@ services:
- ./users:/pvServer/userAuthentication/users
- ./log/:/pvServer/log
- ./build:/pvServer/build
+ depends_on:
+ - epicsbase
pvserver2:
build:
context: ./
@@ -64,6 +77,8 @@ services:
- ./users:/pvServer/userAuthentication/users
- ./log/:/pvServer/log
- ./build:/pvServer/build
+ depends_on:
+ - epicsbase
pvserver3:
build:
context: ./
@@ -90,8 +105,10 @@ services:
- ./users:/pvServer/userAuthentication/users
- ./log/:/pvServer/log
- ./build:/pvServer/build
+ depends_on:
+ - epicsbase
nginx:
- image: nginx:1.19.6
+ image: nginx:1.25.3
restart: always
network_mode: host
depends_on:
@@ -101,7 +118,7 @@ services:
entrypoint:
- /custom/setupNginx.sh
- /docker-entrypoint.sh
- command: ["nginx", "-g", "daemon off;"]
+ command: ["nginx", "-g", "daemon off;"]
volumes:
- ./submodules/React-Automation-Studio/nginx/setupNginx.sh:/custom/setupNginx.sh
- ./submodules/React-Automation-Studio/nginx/nginx.production.conf:/custom/nginx.production.conf
@@ -112,11 +129,29 @@ services:
environment:
- SERVER_PORT=${SERVER_PORT-5000}
env_file: .env
-
- ## ALL Database related Docker processes -start
+ signalcli:
+ build:
+ context: ./submodules/React-Automation-Studio/
+ dockerfile: docker/signalcli/Dockerfile
+ hostname: signalcli
+ restart: always
+ network_mode: "host"
+ stdin_open: true
+ tty: true
+ env_file: .env
+ volumes:
+ - "./signalcli/signal-cli-config:/srv/signal/.local/share/signal-cli"
+
+ # As of RAS V5.0.0 MongoDB the mongodb version is now defined by the RAS_MONGODB_VERSION variable in the .env file
+ # This allows you customize the mongodb version, for example should you want to stay on an older version of mongodb
+
+ # In the volumes section, the mogodb volumes are now defined by the compose project name and mongodb version
+ # It allows for multiple RAS instances to be run on the same machine.
+ # In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file or make sure project folder names are unique between instances
+
mongo1:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo1
restart: always
network_mode: "host"
@@ -132,7 +167,7 @@ services:
command: "--bind_ip_all --port 27017 --replSet ${REPLICA_SET_NAME-devrs}"
mongo2:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo2
restart: always
network_mode: "host"
@@ -148,7 +183,7 @@ services:
command: "--bind_ip_all --port 27018 --replSet ${REPLICA_SET_NAME-devrs}"
mongo3:
- image: mongo:4.2.3-bionic
+ image: mongo:${RAS_MONGODB_VERSION-7.0.5}
hostname: mongo3
restart: always
network_mode: "host"
@@ -162,6 +197,7 @@ services:
- "mongo-db-data3:/data/db"
- "mongo-db-configdb3:/data/configdb"
command: "--bind_ip_all --port 27019 --replSet ${REPLICA_SET_NAME-devrs}"
+
mongosetup:
build:
context: ./submodules/React-Automation-Studio/
@@ -185,7 +221,6 @@ services:
build:
context: ./
-
dockerfile: docker/loadSaveDbInit/Dockerfile
network_mode: "host"
tty: true
@@ -211,6 +246,7 @@ services:
hostname: alarmhandlerserver
restart: always
depends_on:
+ - epicsbase
- initializealarmhandlerdb
network_mode: "host"
stdin_open: true
@@ -224,32 +260,29 @@ services:
- ADMIN_DATABASE=localhost
- ADMIN_DATABASE_REPLICA_SET_NAME=devrs
build:
- context: ./
+ context: ./
dockerfile: ./submodules/React-Automation-Studio/docker/adminDbInit/Dockerfile
network_mode: "host"
tty: true
stdin_open: true
depends_on:
- mongosetup
- signalcli:
- build:
- context: ./submodules/React-Automation-Studio/
- dockerfile: docker/signalcli/Dockerfile
- hostname: signalcli
- restart: always
- network_mode: "host"
- stdin_open: true
- tty: true
- env_file: .env
- volumes:
- - "./signalcli/signal-cli-config:/srv/signal/.local/share/signal-cli"
+# As of RAS V5.0.0 MongoDB volumes are now defined by the compose project name and mongodb version
+# This allows you customize the mongodb version, for example should you want to stay on an older version of mongodb
+# It allows for multiple RAS instances to be run on the same machine.
+# In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file or make sure project folder names are unique between instances
volumes:
mongo-db-data1:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data1-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb1:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb1-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-data2:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data2-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb2:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb2-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-data3:
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-data3-mongo-${RAS_MONGODB_VERSION-7.0.5}
mongo-db-configdb3:
-## ALL Database related Docker processes -end
\ No newline at end of file
+ name: ${COMPOSE_PROJECT_NAME}-mongo-db-configdb3-mongo-${RAS_MONGODB_VERSION-7.0.5}
diff --git a/docker/alarmHandlerDbInit/Dockerfile b/docker/alarmHandlerDbInit/Dockerfile
index 5986368..8ac4af8 100755
--- a/docker/alarmHandlerDbInit/Dockerfile
+++ b/docker/alarmHandlerDbInit/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:3.8.7
+FROM python:3.12.1
ADD ./alarmHandlerDbInit alarmHandlerDbInit
WORKDIR /alarmHandlerDbInit
diff --git a/docker/demoioc/Dockerfile b/docker/demoioc/Dockerfile
index 1d78b76..cfdf176 100644
--- a/docker/demoioc/Dockerfile
+++ b/docker/demoioc/Dockerfile
@@ -1,36 +1,23 @@
+FROM epicsbase as epicsupport
+WORKDIR /epics/support
-FROM ubuntu:18.04
-ENV EPICS_BASE=/epics/base/
-WORKDIR /epics
-RUN apt-get update
+ADD ./submodules/React-Automation-Studio/epics/config /epics/config
-RUN apt-get install -y wget autoconf libtool check patch build-essential libreadline-gplv2-dev re2c libxml2-dev tmux
+RUN wget https://github.com/epics-modules/sscan/archive/refs/tags/R2-11-6.tar.gz
+RUN tar -xvf R2-11-6.tar.gz
-RUN wget https://epics.anl.gov/download/base/base-3.15.6.tar.gz
-RUN tar -xvf base-3.15.6.tar.gz
-RUN ln -s /epics/base-3.15.6 /epics/base
-WORKDIR /epics/base
+RUN cp /epics/config/sscan-R2-11-6/configure/RELEASE /epics/support/sscan-R2-11-6/configure/RELEASE
+WORKDIR /epics/support/sscan-R2-11-6
RUN make
-WORKDIR /epics
-
-RUN wget https://epics.anl.gov/bcda/synApps/tar/synApps_6_0.tar.gz
-RUN tar -xvf synApps_6_0.tar.gz
-RUN ln -s /epics/synApps/support /epics/support
-
-ADD ./submodules/React-Automation-Studio/epics/config /epics/config
-
-WORKDIR /epics/
-
-RUN cp config/synApps_6_0/configure/RELEASE support/configure/RELEASE
-RUN cp config/synApps_6_0/busy-R1-7/configure/RELEASE support/busy-R1-7/configure/RELEASE
-RUN cp config/synApps_6_0/ipac-2-15/configure/RELEASE support/ipac-2-15/configure/RELEASE
WORKDIR /epics/support
-
-RUN make release
+RUN wget https://github.com/epics-modules/calc/archive/refs/tags/R3-7-5.tar.gz
+RUN tar -xvf R3-7-5.tar.gz
+WORKDIR /epics/support/calc-R3-7-5
+RUN cp /epics/config/calc-R3-7-5/configure/RELEASE /epics/support/calc-R3-7-5/configure/RELEASE
RUN make
ADD ./submodules/React-Automation-Studio/epics/testIOC /epics/testIOC
@@ -46,11 +33,9 @@ ENV PYEPICS_LIBCA=/epics/base/lib/linux-x86_64/libca.so
ENV PATH="/epics/base/bin/linux-x86_64/:${PATH}"
RUN echo $PATH
-#RUN ls /epics/base/lib/linux-x86_64/
WORKDIR /epics/testIOC/iocBoot/ioctestIOC/
-CMD ./st.cmd
-#CMD ["/epics/base/bin/linux-x86_64/caget","RFPA:IPA_TUNE_MOT:display_ENG"]
+CMD ../../bin/linux-x86_64/testIOC ./st.cmd
EXPOSE 5000 5064 5065 8001
diff --git a/docker/epicsBase/Dockerfile b/docker/epicsBase/Dockerfile
new file mode 100644
index 0000000..8889b40
--- /dev/null
+++ b/docker/epicsBase/Dockerfile
@@ -0,0 +1,13 @@
+
+FROM python:3.12.1 as epicsbase
+ENV EPICS_BASE=/epics/base/
+WORKDIR /epics
+
+RUN apt-get update && apt-get install -y wget autoconf libtool check patch build-essential libreadline-dev re2c libxml2-dev tmux software-properties-common
+
+RUN wget https://epics-controls.org/download/base/base-7.0.7.tar.gz
+RUN tar -xvf base-7.0.7.tar.gz
+RUN ln -s /epics/base-7.0.7 /epics/base
+WORKDIR /epics/base
+RUN make -j 4
+WORKDIR /epics
diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile
index 42f41b7..c35914a 100644
--- a/docker/frontend/Dockerfile
+++ b/docker/frontend/Dockerfile
@@ -1,16 +1,11 @@
-FROM node:18.18.2
-WORKDIR /frontend
-ENV PATH /frontend/node_modules/.bin:$PATH
-ADD ./ReactApp/package.json /frontend/package.json
-ADD ./ReactApp/jsconfig.json /frontend/jsconfig.json
-ENV PATH /frontend/node_modules/.bin:$PATH
-
-RUN npm install --legacy-peer-dep
-ADD ./ReactApp/public /frontend/public
-ADD ./ReactApp/src /frontend/src
-COPY ./submodules/React-Automation-Studio/ReactApp/src /frontend/src/React-Automation-Studio
-ADD .env /frontend/
+FROM node_cache
+ADD ./ReactApp/public /ReactApp/public
+ADD ./ReactApp/src /ReactApp/src
+ADD ./ReactApp/index.html /ReactApp/index.html
+ADD ./ReactApp/vite.config.js /ReactApp/vite.config.js
+COPY ./submodules/React-Automation-Studio/ReactApp/src /ReactApp/React-Automation-Studio
+ADD .env /ReactApp/
RUN npm run build
VOLUME /build
-CMD cp -R /frontend/build/* /build/
+CMD cp -R /ReactApp/dist/* /build/
diff --git a/docker/frontendserverDev/Dockerfile b/docker/frontendserverDev/Dockerfile
index d744bb4..85fd1d4 100644
--- a/docker/frontendserverDev/Dockerfile
+++ b/docker/frontendserverDev/Dockerfile
@@ -1,17 +1,8 @@
-FROM node:18.18.2
-ADD ./ReactApp/package.json /frontendserverAppDev/package.json
-ADD ./ReactApp/jsconfig.json /frontendserverAppDev/jsconfig.json
-WORKDIR /frontendserverAppDev
-ENV PATH /frontendserverAppDev/node_modules/.bin:$PATH
-RUN npm install --legacy-peer-dep
-ADD .env /frontendserverAppDev/
-WORKDIR /
-WORKDIR /frontendserverAppDev
-RUN mkdir src
-WORKDIR /frontendserverAppDev/src
-RUN mkdir React-Automation-Studio
-WORKDIR /frontendserverAppDev/
-CMD npm start
+FROM node_cache
+ADD .env /ReactApp/
+WORKDIR /ReactApp/
+CMD npm run dev -- --host
-EXPOSE 3001 3000
+EXPOSE 3000
+
diff --git a/docker/loadSaveDbInit/Dockerfile b/docker/loadSaveDbInit/Dockerfile
index d866b08..10be23b 100644
--- a/docker/loadSaveDbInit/Dockerfile
+++ b/docker/loadSaveDbInit/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:3.8.7
+FROM python:3.12.1
ADD ./loadSaveDbInit loadSaveDbInit
diff --git a/docker/node_cache/Dockerfile b/docker/node_cache/Dockerfile
new file mode 100644
index 0000000..35d04ce
--- /dev/null
+++ b/docker/node_cache/Dockerfile
@@ -0,0 +1,5 @@
+FROM node:20.11.0 as node_cache
+ADD ./ReactApp/package.json /ReactApp/package.json
+WORKDIR /ReactApp
+ENV PATH /ReactApp/node_modules/.bin:$PATH
+RUN npm install --legacy-peer-dep
\ No newline at end of file
diff --git a/docker/pvserver/Dockerfile b/docker/pvserver/Dockerfile
index 1301dc3..ecaa7a4 100644
--- a/docker/pvserver/Dockerfile
+++ b/docker/pvserver/Dockerfile
@@ -1,30 +1,25 @@
-FROM python:3.8.7
-RUN apt-get update && apt-get install -y build-essential python3-dev python2.7-dev \
+FROM epicsbase as pvserver
+
+RUN apt-get update && apt-get install -y \
libldap2-dev libsasl2-dev ldap-utils tox \
lcov valgrind
COPY ./submodules/React-Automation-Studio/pvServer/pyproject.toml .
+
RUN pip install --upgrade pip && pip --no-cache-dir install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-dev
WORKDIR /pvServer
-ENV EPICS_BASE=/epics/base/
-WORKDIR /epics
-RUN wget https://epics.anl.gov/download/base/base-3.15.6.tar.gz
-RUN tar -xvf base-3.15.6.tar.gz
-RUN ln -s /epics/base-3.15.6 /epics/base
-WORKDIR /epics/base
-RUN make
-WORKDIR /epics
+
ADD ./submodules/React-Automation-Studio/pvServer /pvServer
WORKDIR /pvServer
ENV pvServerURL=http://127.0.0.1
ENV pvServerPort=5000
ENV pvServerNameSpace=pvServer
-ENV REACT_APP_EnableLogin=false
-ENV REACT_APP_DisableStandardLogin=false
-ENV REACT_APP_EnableActiveDirectoryLogin=false
-ENV REACT_APP_EnableGoogleLogin=false
-ENV EPICS_CA_ADDR_LIST="0.0.0.0:8001 0.0.0.0:8002 0.0.0.0:8004"
+ENV VITE_EnableLogin=false
+ENV VITE_DisableStandardLogin=false
+ENV VITE_EnableActiveDirectoryLogin=false
+ENV VITE_EnableGoogleLogin=false
+ENV EPICS_CA_ADDR_LIST="0.0.0.0:8001 0.0.0.0:8002 0.0.0.0:8004 0.0.0.0:8005"
ENV PYEPICS_LIBCA=/epics/base/lib/linux-x86_64/libca.so
ENV PATH="/epics/base/bin/linux-x86_64/:${PATH}"
RUN echo $pvServerURL
diff --git a/docker/stagingioc/Dockerfile b/docker/stagingioc/Dockerfile
index 191dd32..48b86af 100644
--- a/docker/stagingioc/Dockerfile
+++ b/docker/stagingioc/Dockerfile
@@ -1,38 +1,22 @@
+FROM epicsbase as epicsupport
-FROM ubuntu:18.04
-ENV EPICS_BASE=/epics/base/
-
-WORKDIR /epics
+WORKDIR /epics/support
-RUN apt-get update
+ADD ./submodules/React-Automation-Studio/epics/config /epics/config
-RUN apt-get install -y wget autoconf libtool check patch build-essential libreadline-gplv2-dev re2c libxml2-dev tmux
+RUN wget https://github.com/epics-modules/sscan/archive/refs/tags/R2-11-6.tar.gz
+RUN tar -xvf R2-11-6.tar.gz
-RUN wget https://epics.anl.gov/download/base/base-3.15.6.tar.gz
-RUN tar -xvf base-3.15.6.tar.gz
-RUN ln -s /epics/base-3.15.6 /epics/base
-WORKDIR /epics/base
+RUN cp /epics/config/sscan-R2-11-6/configure/RELEASE /epics/support/sscan-R2-11-6/configure/RELEASE
+WORKDIR /epics/support/sscan-R2-11-6
RUN make
-WORKDIR /epics
-
-RUN wget https://epics.anl.gov/bcda/synApps/tar/synApps_6_0.tar.gz
-RUN tar -xvf synApps_6_0.tar.gz
-RUN ln -s /epics/synApps/support /epics/support
-
-
-ADD ./epics/config /epics/config
-
-WORKDIR /epics/
-
-RUN cp config/synApps_6_0/configure/RELEASE support/configure/RELEASE
-RUN cp config/synApps_6_0/busy-R1-7/configure/RELEASE support/busy-R1-7/configure/RELEASE
-RUN cp config/synApps_6_0/ipac-2-15/configure/RELEASE support/ipac-2-15/configure/RELEASE
WORKDIR /epics/support
-
-RUN make release
+RUN wget https://github.com/epics-modules/calc/archive/refs/tags/R3-7-5.tar.gz
+RUN tar -xvf R3-7-5.tar.gz
+WORKDIR /epics/support/calc-R3-7-5
+RUN cp /epics/config/calc-R3-7-5/configure/RELEASE /epics/support/calc-R3-7-5/configure/RELEASE
RUN make
-
ADD ./epics/stagingTestIOC /epics/stagingTestIOC
WORKDIR /epics/stagingTestIOC
RUN make clean
diff --git a/docker/storybook/Dockerfile b/docker/storybook/Dockerfile
new file mode 100644
index 0000000..eec3794
--- /dev/null
+++ b/docker/storybook/Dockerfile
@@ -0,0 +1,11 @@
+FROM node_cache
+ADD ./.env /ReactApp/
+ADD ./submodules/React-Automation-Studio/ReactApp/src /ReactApp/React-Automation-Studio
+ADD ./ReactApp/src /ReactApp/src
+ADD ./ReactApp/vite.config.js /ReactApp/vite.config.js
+ADD ./ReactApp/.storybook /ReactApp/.storybook
+COPY ./submodules/React-Automation-Studio/ReactApp/img /ReactApp/img
+RUN npm run build-storybook
+ADD ./ReactApp/img /ReactApp/storybook-static/img
+VOLUME /build
+CMD cp -R /ReactApp/storybook-static/* /build
diff --git a/docker/storybookServerDev/Dockerfile b/docker/storybookServerDev/Dockerfile
new file mode 100644
index 0000000..60b4af2
--- /dev/null
+++ b/docker/storybookServerDev/Dockerfile
@@ -0,0 +1,6 @@
+FROM node_cache
+ADD .env /ReactApp/
+WORKDIR /ReactApp
+ADD ./ReactApp/img /ReactApp/img
+CMD npm run storybook
+EXPOSE 6006
diff --git a/docker/styleguide/Dockerfile b/docker/styleguide/Dockerfile
deleted file mode 100644
index f980607..0000000
--- a/docker/styleguide/Dockerfile
+++ /dev/null
@@ -1,21 +0,0 @@
-FROM node:18.18.2
-
-ADD ./ReactApp/package.json /app/package.json
-
-WORKDIR /app
-ENV PATH /app/node_modules/.bin:$PATH
-
-
-RUN npm install --legacy-peer-dep
-ADD ./ReactApp/public /app/public
-
-ADD ./.env /app/
-ADD ./submodules/React-Automation-Studio/ReactApp/src /app/src/React-Automation-Studio
-ADD ./ReactApp/styleguide.config.js /app/styleguide.config.js
-ADD ./ReactApp/src/components /app/src/components
-ADD ./ReactApp/src/docs /app/src/docs
-ADD ./submodules/React-Automation-Studio/ReactApp/img /app/img
-RUN npm run styleguidebuild
-ADD ./ReactApp/img /app/styleguide/img
-VOLUME /build
-CMD cp -R /app/styleguide/* /build
diff --git a/docker/styleguideServerDev/Dockerfile b/docker/styleguideServerDev/Dockerfile
deleted file mode 100644
index b7f68d0..0000000
--- a/docker/styleguideServerDev/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-FROM node:18.18.2
-
-ADD ./ReactApp/package.json /app/package.json
-
-WORKDIR /app
-ENV PATH /app/node_modules/.bin:$PATH
-
-
-RUN npm install --legacy-peer-dep
-ADD ./ReactApp/public /app/public
-
-ADD .env /app/
-ADD ./submodules/React-Automation-Studio/ReactApp/src /app/src/React-Automation-Studio
-ADD ./ReactApp/styleguide.config.js /app/styleguide.config.js
-ADD ./submodules/React-Automation-Studio/ReactApp/img /app/img
-
-
-
-
-
-
-
-WORKDIR /app
-#ADD ./ReactApp/img /app/img
-ENV REACT_APP_StyleguideServerPORT=6060
-ENV REACT_APP_StyleguideServerURL=http://127.0.0.1
-CMD npm run styleguide
-
-EXPOSE 6060
diff --git a/docs/migrate-from-V4-to-V5.md b/docs/migrate-from-V4-to-V5.md
new file mode 100644
index 0000000..658bc06
--- /dev/null
+++ b/docs/migrate-from-V4-to-V5.md
@@ -0,0 +1,93 @@
+In release V5.0.0 we have moved away from Create-React-App to Vite
+
+This was forced upon us as Create-React-App has been deprecated and we needed to move to a new build system.
+
+You can read more about this at https://github.com/reactjs/react.dev/pull/5487#issuecomment-1409720741
+
+We are pretty much tied into React-router-dom and a single page application that manages the state globally. That is why we have chosen Vite as it is a very fast build system and it is very easy to use.
+
+We have also updated all the backend and frontend packages to the latest versions. This means that you will need to update your code to use the new versions of the packages.
+
+We have also introduced multistage builds for the backend and frontend. This dramatically speeds up the build process.
+
+We suggest to you to clone the example projects and insert your code into the new projects.
+
+There are a number of changes that you will need to make to your code to move from V4 to V5.
+
+And we have included a list of the main changes below:
+
+## Moving from Create-React-App to Vite
+
+1. Migrate your .env file and rename all variables in your .env file from `REACT_APP_` to `VITE_` and remove the `REACT_APP_` prefix.
+2. Vite requires all files with JSX to be named with the `.jsx` extension. You will need to rename the files with JSX from `.js` files to `.jsx` files.
+3. In your JSX files, if you have imports with a .js extension, you will need to remove the extension.
+4. We have kept all the ports the same as in V4. This means that you will not need to change the ports.
+5. Any imports that used './React-Automation-Studio/...' will need to be changed to 'React-Automation-Studio/...'.
+## Updating the backend and frontend packages
+
+1. The pvServer uses EPICS 7.0.7 and Python 3.12.1, if you have any customizations to the pvServer, you will need to update the pvServer to use the latest version of EPICS and Python.
+2. The frontend uses the latest version of React and React-Router-Dom.
+ We were stuck on React-Router-Dom 5.3.3 and we have now moved to React-Router-Dom 6.21.3. You will need to update your code to use the latest versions of these packages.
+
+ We followed the migration guide at https://reactrouter.com/docs/en/v6/getting-started/migrating.
+ This impacted us in the following ways. There was a clash in ReactApp/src/Routes.js name with the new React-Router-Dom 6.21.3. We had to rename the file to ReactApp/src/AppRoutes.jsx.
+ We needed to update the code in the file to use the new version of React-Router-Dom. This also impacted the ProtectedRoute component:
+
+ Previously in the Routes.js we had:
+
+ ```jsx
+
+
+
+ ... more routes
+
+
+ ```
+
+ Now in the AppRoutes.jsx we have:
+
+ ```jsx
+
+
+
+
+
+ }
+ />
+ ... more routes
+
+
+ ```
+ We also had to update the code in the ReactApp/src/components/SystemComponents/Login.Login.jsx to use the new version of React-Router-Dom. If you used a custom version then please update it to use the new version of React-Router-Dom.
+
+## Multistage builds
+ We have introduced multistage builds for the docker compose files.
+ This means that you will need to update your docker-compose files to use the new multistage builds.
+
+## MongoDB
+ We have updated the MongoDB to use the latest version of MongoDB.
+ We suggest you dump your previous version of the database and insert the documents into the latest version.
+
+ We have also added a named volume for the MongoDB replica sets.
+
+ As of RAS V5.0.0 MongoDB volumes are now defined by the compose project name and MongoDB version
+ This allows you to customize the MongoDB version, for example, if you want to stay on an older version of MongoDB
+ It allows for multiple RAS instances to be run on the same machine.
+ In this case, make sure to set the COMPOSE_PROJECT_NAME variable in the .env file
+ or make sure project folder names are unique between instances
+
+ You can also stay on the previous version of MongoDB by setting the MONGO_VERSION
+ variable in the .env file to the previous version of MongoDB.
+ You might also need to update the docker-compose files to use the previous version of MongoDB.
+
+## Styleguide
+ We have moved from react-styleguidist to Storybook. If you have any customizations to the styleguide,
+ you will need to update the styleguide to use Storybook.
+ The Storybook configs are now located in the ReactApp/.storybook folder.
+
diff --git a/epics/stagingTestIOC/configure/RELEASE b/epics/stagingTestIOC/configure/RELEASE
index 9b24b47..4eabf8a 100644
--- a/epics/stagingTestIOC/configure/RELEASE
+++ b/epics/stagingTestIOC/configure/RELEASE
@@ -25,7 +25,7 @@
# Variables and paths to dependent modules:
#MODULES = /path/to/modules
#MYMODULE = $(MODULES)/my-module
-CALC=/epics/support/calc-R3-7-1
+CALC=/epics/support/calc-R3-7-5
# If using the sequencer, point SNCSEQ at its top directory:
#SNCSEQ = $(MODULES)/seq-ver
diff --git a/example.env b/example.env
index 0747df4..69c9021 100644
--- a/example.env
+++ b/example.env
@@ -1,19 +1,11 @@
#.env file
-REACT_APP_EnableLogin=true
-SERVER_PORT=5000
-
-# HTTPS settings ##
-# SECURE=true
-# HTTP_REDIRECT_TO_HTTPS=true
-
-# AD authentication settings ##
-# REACT_APP_EnableActiveDirectoryLogin=true
-# LDAP_HOST=ldap://
-# LDAP_PORT=389
-
-# Google authentication settings ##
-# REACT_APP_EnableGoogleLogin=true
-# REACT_APP_EnableGoogleLoginId=
+pvServerURL=http://127.0.0.1
+VITE_EnableLogin=false
+VITE_FrontendServerPORT=9000
+pvServerPort=5000
+VITE_PyEpicsServerStyleguidePORT=5001
+VITE_StyleguideServerPORT=6060
+VITE_EnableLoginStyleguide=false
## Mongo Database settings ##
#############################
diff --git a/submodules/React-Automation-Studio b/submodules/React-Automation-Studio
index 029591e..0d9cba0 160000
--- a/submodules/React-Automation-Studio
+++ b/submodules/React-Automation-Studio
@@ -1 +1 @@
-Subproject commit 029591e1ca0e6db4f3bf393f0fdd04d7a0483b85
+Subproject commit 0d9cba0f0d988918b7c7cf28faa151b2c1a64af3