2025-04-21 23:31:57 -05:00
2025-04-21 22:39:17 -05:00
2025-04-21 22:38:13 -05:00
2025-04-21 23:31:57 -05:00

Cheminformatics with Tailscale Integration

Cheminformatics with Tailscale

This project sets up a Cheminformatics instance with Tailscale VPN integration using Docker Compose. It creates a secure, private network connection for your Cheminformatics instance using Tailscale.

** IMPORTANT NOTE **

Due to the somewhat atypical nature of this project and the current lack of multi-arch images available in public registries this deployment requires more configuration and depends on a local build of the images to ensure a reliable deployment.

Prerequisites

  • Docker and Docker Compose installed on your system
  • A Tailscale account and auth key (get one from https://login.tailscale.com/admin/authkeys)
  • Tailscale SSL certs are enabled in the admin page.
  • Basic understanding of Docker and networking concepts

Project Structure

ts-cheminformatics/
├── docker-compose.yml
├── tailscale/
│   ├── tailscale-data/                 # Persistent Tailscale state
│   └── config/                         # Tailscale configuration files
└── cheminformatics-microservice/       # Cheminformatics Source Code

Setup Instructions

  1. Clone the Repository

    git clone https://gitea.damconsulting.llc/DAM/ts-cheminformatics
    cd ts-cheminformatics
    git clone https://github.com/Steinbeck-Lab/cheminformatics-microservice.git
    
  2. Create Required Directories

    mkdir -p tailscale/tailscale-data
    
  3. Configure Tailscale

    • Replace {{YOUR_TAILSCALE_AUTHKEY}} in the docker-compose.yml with your actual Tailscale auth key
    • Optionally, update the file in tailscale/config/serve.json if you need specific Tailscale serve configurations
      • CAUTION: Changing "${TS_CERT_DOMAIN}:443": false to true will expose the service to the internet
  4. Configure Cheminformatics

    • At the end of ./ts-cheminformatics/cheminformatics-microservice/Dockerfile change --port 80 to --port 8080
    • See the documentation for supplimental options
  5. Start the Services navigate to ./ts-cheminformatics

    docker compose up --build -d
    
  6. Wait for Certificate to propagate [~2m]

  7. Login

Services

cheminformatics-ts (Tailscale)

  • Runs Tailscale VPN client
  • Image: tailscale/tailscale:latest
  • Container name: cheminformatics-ts
  • Hostname: cheminformatics
  • Requires NET_ADMIN and SYS_MODULE capabilities
  • Persists state in ./tailscale/tailscale-data
  • Uses configuration from ./tailscale/config

cheminformatics-backend

  • Depends on cheminformatics-ts service

cheminformatics-frontend

  • Depends on cheminformatics-ts service

Usage

  • After starting the services your service should be available via tailnet at https://cheminformatics.{{YOUR_TAILNET_DOMAIN}}.ts.net ie https://cheminformatics.tail12345.ts.net/
  • To manually get the Tailscale IP/hostname of your container:
    docker logs cheminformatics-ts
    
    Look for the Tailscale IP address in the logs.

Optional Features

  • Uncomment and adjust the ports mapping if you need direct access (without Tailscale):

    ports:
    - 8080:8080
    - 80:80
    
  • Stopping the Services

    docker compose down
    
  • Connect to Prometheus

    assuming you already have a prometheus instance in your tailnet add the following to your prometheus.yml configuration file:

    - job_name: 'cheminformatics'
    scrape_interval: 10s
    metrics_path: /metrics
    static_configs:
        - targets: ['cheminformatics:8080']
    

Troubleshooting

  • Check container logs:
    docker logs cheminformatics-ts
    docker logs cheminformatics-backend
    docker logs cheminformatics-frontend
    
  • Ensure your Tailscale auth key is valid and not expired
  • Verify the configuration files have proper permissions
  • Make sure required directories exist before starting

Notes

  • The Cheminformatics service uses the Tailscale service's network stack via network_mode: service:cheminformatics-ts
  • Direct port mapping is disabled by default as Tailscale handles the networking
  • Services restart automatically unless explicitly stopped
  • For more information:
Description
A customized deployment of cheminformatics-microservices for a tailscale ready deployment
Readme 40 KiB