generated from DAM/ts-TEMPLATE
manual init
This commit is contained in:
parent
d72394c64b
commit
af0bc98775
81
README.md
81
README.md
@ -1,33 +1,38 @@
|
|||||||
# {{Service}} with Tailscale Integration
|
# Cheminformatics with Tailscale Integration
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
This project sets up a {{Service}} instance with Tailscale VPN integration using Docker Compose. It creates a secure, private network connection for your {{Service}} instance using 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
|
## Prerequisites
|
||||||
|
|
||||||
- Docker and Docker Compose installed on your system
|
- Docker and Docker Compose installed on your system
|
||||||
- A Tailscale account and auth key (get one from https://login.tailscale.com/admin/authkeys)
|
- 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
|
- Basic understanding of Docker and networking concepts
|
||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
```
|
```
|
||||||
ts-{{service}}/
|
ts-cheminformatics/
|
||||||
├── docker-compose.yml
|
├── docker-compose.yml
|
||||||
├── tailscale/
|
├── tailscale/
|
||||||
│ ├── tailscale-data/ # Persistent Tailscale state
|
│ ├── tailscale-data/ # Persistent Tailscale state
|
||||||
│ └── config/ # Tailscale configuration files
|
│ └── config/ # Tailscale configuration files
|
||||||
└── {{service}}/
|
└── cheminformatics-microservice/ # Cheminformatics Source Code
|
||||||
└── config/ # {{Service}} configuration files
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setup Instructions
|
## Setup Instructions
|
||||||
|
|
||||||
1. **Clone the Repository**
|
1. **Clone the Repository**
|
||||||
```bash
|
```bash
|
||||||
git clone https://gitea.damconsulting.llc/DAM/ts-{{service}}
|
git clone https://gitea.damconsulting.llc/DAM/ts-cheminformatics
|
||||||
cd ts-{{service}}
|
cd ts-cheminformatics
|
||||||
```
|
git clone https://github.com/Steinbeck-Lab/cheminformatics-microservice.git
|
||||||
|
```
|
||||||
2. Create Required Directories
|
2. Create Required Directories
|
||||||
```bash
|
```bash
|
||||||
mkdir -p tailscale/tailscale-data
|
mkdir -p tailscale/tailscale-data
|
||||||
@ -37,8 +42,9 @@ ts-{{service}}/
|
|||||||
- Optionally, update the file in `tailscale/config/serve.json` if you need specific Tailscale serve configurations
|
- 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
|
- CAUTION: Changing `"${TS_CERT_DOMAIN}:443": false` to `true` will expose the service to the internet
|
||||||
|
|
||||||
4. Configure {{Service}}
|
4. Configure Cheminformatics
|
||||||
- See the [documentation]({{service_docs}}) for configuration options
|
- At the end of `./ts-cheminformatics/cheminformatics-microservice/Dockerfile` change `--port 80` to `--port 8080`
|
||||||
|
- See the [documentation](https://docs.api.naturalproducts.net/introduction.html) for supplimental options
|
||||||
|
|
||||||
5. Start the Services
|
5. Start the Services
|
||||||
```bash
|
```bash
|
||||||
@ -48,30 +54,34 @@ ts-{{service}}/
|
|||||||
6. Wait for Certificate to propagate [~2m]
|
6. Wait for Certificate to propagate [~2m]
|
||||||
|
|
||||||
7. Login
|
7. Login
|
||||||
- After starting the services your service should be available via tailnet at https://{{service}}.{{YOUR_TAILNET_DOMAIN}}.ts.net ie https://{{service}}.tail12345.ts.net/
|
- 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/
|
||||||
|
|
||||||
## Services
|
## Services
|
||||||
|
|
||||||
### {{service}}-ts (Tailscale)
|
### cheminformatics-ts (Tailscale)
|
||||||
|
|
||||||
- Runs Tailscale VPN client
|
- Runs Tailscale VPN client
|
||||||
- Image: tailscale/tailscale:latest
|
- Image: tailscale/tailscale:latest
|
||||||
- Container name: {{service}}-ts
|
- Container name: cheminformatics-ts
|
||||||
- Hostname: {{service}}
|
- Hostname: cheminformatics
|
||||||
- Requires NET_ADMIN and SYS_MODULE capabilities
|
- Requires NET_ADMIN and SYS_MODULE capabilities
|
||||||
- Persists state in ./tailscale/tailscale-data
|
- Persists state in ./tailscale/tailscale-data
|
||||||
- Uses configuration from ./tailscale/config
|
- Uses configuration from ./tailscale/config
|
||||||
|
|
||||||
### {{service}}
|
### cheminformatics-backend
|
||||||
|
|
||||||
- Depends on {{service}}-ts service
|
- Depends on cheminformatics-ts service
|
||||||
|
|
||||||
|
### cheminformatics-frontend
|
||||||
|
|
||||||
|
- Depends on cheminformatics-ts service
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- After starting the services your service should be available via tailnet at `https://{{service}}.{{YOUR_TAILNET_DOMAIN}}.ts.net` ie `https://{{service}}.tail12345.ts.net/`
|
- 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:
|
- To manually get the Tailscale IP/hostname of your container:
|
||||||
```bash
|
```bash
|
||||||
docker logs {{service}}-ts
|
docker logs cheminformatics-ts
|
||||||
```
|
```
|
||||||
Look for the Tailscale IP address in the logs.
|
Look for the Tailscale IP address in the logs.
|
||||||
|
|
||||||
@ -80,29 +90,42 @@ ts-{{service}}/
|
|||||||
- Uncomment and adjust the ports mapping if you need direct access (without Tailscale):
|
- Uncomment and adjust the ports mapping if you need direct access (without Tailscale):
|
||||||
```yaml
|
```yaml
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 8080:8080
|
||||||
|
- 80:80
|
||||||
```
|
```
|
||||||
- Stopping the Services
|
- Stopping the Services
|
||||||
```bash
|
```bash
|
||||||
docker compose down
|
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:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- job_name: 'cheminformatics'
|
||||||
|
scrape_interval: 10s
|
||||||
|
metrics_path: /metrics
|
||||||
|
static_configs:
|
||||||
|
- targets: ['cheminformatics:8080']
|
||||||
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
- Check container logs:
|
- Check container logs:
|
||||||
```bash
|
```bash
|
||||||
docker logs {{service}}-ts
|
docker logs cheminformatics-ts
|
||||||
docker logs {{service}}
|
docker logs cheminformatics-backend
|
||||||
|
docker logs cheminformatics-frontend
|
||||||
```
|
```
|
||||||
- Ensure your Tailscale auth key is valid and not expired
|
- Ensure your Tailscale auth key is valid and not expired
|
||||||
- Verify the configuration files have proper permissions
|
- Verify the configuration files have proper permissions
|
||||||
- Make sure required directories exist before starting
|
- Make sure required directories exist before starting
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
- The {{Service}} service uses the Tailscale service's network stack via `network_mode: service:{{service}}-ts`
|
- 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
|
- Direct port mapping is disabled by default as Tailscale handles the networking
|
||||||
- Services restart automatically unless explicitly stopped
|
- Services restart automatically unless explicitly stopped
|
||||||
- For more information:
|
- For more information:
|
||||||
- Tailscale documentation: https://tailscale.com/kb/
|
- Tailscale documentation: https://tailscale.com/kb/
|
||||||
- {{Service}} [documentation]({{service_docs}})
|
- Cheminformatics [documentation](https://docs.api.naturalproducts.net/introduction.html)
|
||||||
- {{Service}} [repository]({{service_repo}})
|
- Cheminformatics [repository](https://github.com/Steinbeck-Lab/cheminformatics-microservice/)
|
||||||
- {{Service}} [linuxserve.io]({{service_lcsr}})
|
|
Loading…
x
Reference in New Issue
Block a user