Docker Compose
Docker Compose provides a straightforward deployment method suitable for development, testing, and production environments by packaging Wave services and dependencies into a coordinated container stack. This approach handles service orchestration automatically, coordinating startup and networking of Wave components, with updates performed by downloading new container versions and restarting the application stack.
Docker Compose installations support Wave Lite, a configuration mode for Wave that includes only container augmentation and inspection capabilities, and enables the use of Fusion file system in Nextflow pipelines.
This page describes how to run Wave Lite on Docker Compose. It includes:
- Database configuration
- Wave configuration
- Docker Compose
- Wave deployment
- Advanced configuration
You will need the following to get started:
- A PostgreSQL instance (version 12 or higher)
- A Redis instance (version 6.2 or higher)
- Supported versions of Docker Engine and Docker Compose
- A compute instance with at least:
- Memory: 32 GB RAM available for use by the Wave application on the host system
- CPU: 8 CPU cores available on the host system
- Storage: 10 GB in addition to sufficient disk space for your container images and temporary files (for example, in AWS EC2,
m5a.2xlargeor greater) - Network: Connectivity to your PostgreSQL and Redis instances
Database configuration
To create your wave PostgreSQL database and user account with appropriate privileges:
-
Connect to PostgreSQL.
-
Create a dedicated user for Wave:
CREATE ROLE wave_user LOGIN PASSWORD '<SECURE_PASSWORD>';Replace
<SECURE_PASSWORD>with a secure password for the database user. -
Create the Wave database:
CREATE DATABASE wave; -
Connect to the wave database:
\c wave; -
Grant basic schema access:
GRANT USAGE, CREATE ON SCHEMA public TO wave_user; -
Grant privileges on existing tables and sequences:
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO wave_user;
GRANT USAGE, SELECT, UPDATE ON ALL SEQUENCES IN SCHEMA public TO wave_user; -
Grant privileges on future tables and sequences:
ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO wave_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public
GRANT USAGE, SELECT, UPDATE ON SEQUENCES TO wave_user;
Wave will automatically handle schema migrations and create the required database objects on startup.
Wave configuration
To configure Wave, create a config/wave-config.yml file in your Docker Compose directory with the following configuration:
wave:
# Build service configuration - disabled for Docker Compose
build:
enabled: false
# Mirror service configuration - disabled for Docker Compose
mirror:
enabled: false
# Security scanning configuration - disabled for Docker Compose
scan:
enabled: false
# Blob caching configuration - disabled for Docker Compose
blobCache:
enabled: false
# Database connection settings
db:
uri: "jdbc:postgresql://<POSTGRES_HOST>:5432/wave"
user: "wave_user"
password: "<SECURE_PASSWORD>"
# Redis configuration for caching and session management
redis:
uri: "redis://<REDIS_HOST>:6379"
# Platform integration (optional)
tower:
endpoint:
url: "<PLATFORM_SERVER>"
# Micronaut framework configuration
micronaut:
# Netty HTTP server configuration
netty:
event-loops:
default:
num-threads: 64
stream-pool:
executor: stream-executor
# HTTP client configuration
http:
services:
stream-client:
read-timeout: 30s
read-idle-timeout: 5m
event-loop-group: stream-pool
# Management endpoints configuration
loggers:
env:
enabled: false
bean:
enabled: false
caches:
enabled: false
refresh:
enabled: false
loggers:
enabled: false
info:
enabled: false
# Enable metrics for monitoring
metrics:
enabled: true
# Enable health checks
health:
enabled: true
disk-space:
enabled: false
jdbc:
enabled: false
Replace the following:
<POSTGRES_HOST>: your Postgres service endpoint<REDIS_HOST>: your Redis service endpoint<SECURE_PASSWORD>: your secure password for the database user<PLATFORM_SERVER>: your Platform endpoint URL (optional)
Adjust the following values based on your CPU cores:
number-of-threads: Set between 2x and 4x your CPU core count (default: 16)num-threads: Set between 2x and 4x your CPU core count (default: 64)
Docker Compose
To configure Docker Compose, create a docker-compose.yml file with the following configuration:
services:
wave-app:
image: your-registry.com/wave:latest
container_name: wave-app
ports:
# Bind to the host on 9100 vs 9090
- "9100:9090"
environment:
- MICRONAUT_ENVIRONMENTS=lite,redis,postgres
volumes:
- ./config/wave-config.yml:/work/config.yml:ro
deploy:
mode: replicated
replicas: 2
resources:
limits:
memory: 4G
cpus: '1.0'
reservations:
memory: 4G
cpus: '1'
# Health check configuration
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9090/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Restart policy
restart: unless-stopped
Wave deployment
To deploy Wave Lite using Docker Swarm:
-
Download and populate the wave.env file with the settings corresponding to your system.
-
Use Docker Swarm to deploy Wave Lite. See Create a swarm for detailed setup instructions.
-
Deploy the Wave service, running two replicas:
docker stack deploy -c docker-compose.yml mystacknoteWave is available at
http://localhost:9090once the container is running and healthy. The application may take 30-60 seconds to fully initialize on first startup, as it performs database migrations. -
Check the current status:
docker service ls -
Check the logs:
docker service logs mystack_wave -
Tear down the service when it's no longer needed:
docker stack rm mystackwarningIf Wave Lite is running in the same container as Platform Connect for Studios, tearing down the service will also interrupt Connect services.
Advanced configuration
See Configuring Wave for advanced Wave features, scaling guidance, and integration options.