Before beginning, make sure you've installed and started Docker. For more information see the docker docs.
Simply navigate to the root folder of this repository and use the command
docker-compose up --build
This will build and deploy the epics2web tomcat server, a simple http to caproto server, and a testing IOC.
Feel free to modify the docker-compose file to add/remove any required servers.
To change the EPICS_CA_ADDR_LIST
variable, modify docker-compose.yml.
To run react, simply navigate to the _reactclient/ folder and type npm start
(npm install
before that when starting from scratch). This will start a hot-reloading development server and open localhost:3000
.
To run the _ioc_towebsocket tomcat server independently, navigate to the _ioc_towebsocket folder, and build and run a docker container.
See steps below.
docker build -t ioc_to_websocket --build-arg epic_ca_addr_list="<IOC IPs>" .
Note that <IOC IPs>
must be replaced with actual IPs. Information about the formatting of this can be found here.
If you'd like to connect to the test IOCs within the bridge network, you can put the broadcast address of the bridge network here, which by default should be 172.17.255.255
, or something similar.
If you're not sure what the broadcast address is, you can start an alpine terminal (docker run alpine ash
) and check the output of ifconfig
.
Simply run docker run -p 8080:8080 ioc_to_websocket
.
If you wish to run a detached container, simply add the -d
flag.
Note that the -p 8080:8080
will bind the debug interface to localhost:8080/epics2web
. If you do not wish to publish this interface, omit this argument.
I've tried to make adding PVComponents super simple.
import PVComponent, { ConnectComponent } from '../PVComponent'
class PVMyComponent extends PVComponent
export default ConnectComponent(PVMyComponent)
this.props.pvs[pvId].value
For a super simple example, see /react-client/src/PVComponents/PVLed.js
.