How do i deploy ChemDraw JS 25 and ChemDraw Web Service 25 on Linux_Ubuntu Server with NGINX reverse proxy?
Create your account at https://hub.docker.com/ so you can load the ChemDraw Web Service image into your Linux server using the terminal.
- Copy the chemdraw-web-service-2.18.0-1440.tar.gz file that you received to a Mac OS or Linux device.
- Open the Terminal and update your system, run the following command: sudo apt-get -y update
- Install Docker with the following command: sudo apt install -y docker.io
- Go to the directory where you have your CDJS25 files
- Run the following command: sudo docker load --input chemdraw-web.tar.gz
You should see the following in your terminal:
Loaded image: pkiinformatics/chemdraw-web-service:2.18.0-1440
- Create a tag for the image so you can push it to your Docker Hub instance, run the following command: sudo docker tag pkiinformatics/ chemdraw-web-service:2.18.0-1440 yourdockerusername/cdws25
- Push your image to your Docker Hub with the following command: sudo docker push yourdockerusername/cdws25
You should see the following in your terminal:
Using default tag: latest
The push refers to repository [docker.io/ yourdockerusername/cdws25]
f8a12345d7ab: Pushed
c5dbe99201b3: Pushed
2ad72ff7e10c: Pushed
0b26f86e9f4c: Pushed
...
latest: digest: sha256:6b1a1234c2d... size: 1781
- Create a new AWS EC2 instance with Linux server OS (Ubuntu) and install Docker and NGINX
https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Home
Server side - Run the following commands:
- sudo adduser cdws
- sudo usermod -aG sudo cdws
- sudo apt-get -y update
- sudo apt install docker.io nginx
- sudo docker login
- sudo docker pull yourdockerusername/cdws25
- sudo docker run --publish 8080:80 yourdockerusername/cdws25
You should see the following in your terminal:
chemdraw-web-service@25.0.x start
node dist/index.js --port 80
{"level":30,"msg":"Starting ChemDraw Web Service"}
{"level":30,"msg":"Version: 25.0.x (ChemDrawSDK.Node: 25.0.x, ChemDrawSDK: 25.0.0.0)"}
{"level":30,"msg":"Host information: 1 CPU core, 1.9 GB memory"}
You can test if your ChemDraw Web Service is running with the following link:
http://localhost:8080/1.0/health-full
You should see the following status message:
{"status":"OK","version":"25.0.x","freeMemBytes":...}
You can also check the http://localhost:8080/1.0/help for all the RESTful API backend details.
- Install NGINX with the following command: sudo apt install nginx
You can check the following links for further instructions: Ubuntu NGINX | NGINX Official
- Create the index.html file of your ChemDraw JS 25 application following the instructions on page 6 of the ChemDraw JS Developer's Guide.
- Paste your ChemDraw JS application on the following NGINX server path: /var/www/html.
Run your ChemDraw JS 25 application containing the chemdrawweb folder included in the revvity-signals-chemdraw-js-25.0.1-13+015136279.zip that you received.
If you can see the ChemDraw.loadSMILES() result on the drawing pane your NGINX reverse proxy is working correctly.
Comments
0 comments
Article is closed for comments.