Skip to content

cheminfo/openbabel

Repository files navigation

openbabel

Web service that converts between molecule formats using OpenBabel.

Installation with Docker

The service is distributed as a Docker image at ghcr.io/cheminfo/openbabel.

git clone https://github.com/cheminfo/openbabel.git
cd openbabel

cp .env.example .env
cp compose.example.yaml compose.yaml

# Run the released image:
docker compose pull && docker compose up -d

# Or rebuild from the current checkout:
docker compose up -d --build

The default port is 20808. Change it by editing PORT in .env. Open http://localhost:20808/ to access the Swagger UI.

Cloudflare Tunnel deployment

For a publicly-reachable deployment behind Cloudflare Tunnel (no host port published):

cp .env.example .env
cp compose.example.cloudflared.yaml compose.yaml

In the Cloudflare dashboard (https://dash.cloudflare.com):

  1. Navigate to Networking → Tunnels → Create a tunnel → Cloudflared connector.
  2. Copy the generated token into .env as TUNNEL_TOKEN=....
  3. Open the tunnel, go to the Published applications tab, and add an application with:
    • Public hostname: openbabel.lactame.com (or another domain you control)
    • Service type: HTTP
    • Service URL: openbabel:20808 (match PORT from .env)

Then start the stack:

docker compose up -d

Traefik deployment

For a host that already runs a Traefik reverse proxy on an external Docker network named traefik (with a websecure entrypoint and a letsencrypt cert resolver):

cp .env.example .env
cp compose.example.traefik.yaml compose.yaml
docker compose up -d

Edit the Host(...) label in compose.yaml to point at the public hostname you have configured for this service (default openbabel.cheminfo.org).

Local development

npm install
npm run dev

PORT and BABEL are read from the environment (with .env auto-loaded via node --env-file-if-exists=.env). By default BABEL is auto-detected from /opt/homebrew/bin/obabel and /usr/bin/obabel.

Run the full check (tests + eslint + prettier):

npm test

License

MIT

OpenBabel is subject to its own license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors