coolify/templates/compose/cap.yaml

89 lines
No EOL
3.1 KiB
YAML

# documentation: https://cap.so
# slogan: Cap is the open source alternative to Loom. Lightweight, powerful, and cross-platform. Record and share in seconds.
# tags: cap,loom,open,source,low,code
# logo: svgs/cap.svg
# port: 5679
# Storage options:
# - Default: local MinIO (`cap-s3`) with endpoints injected by Coolify.
# - Remote S3-compatible (AWS S3, Cloudflare R2, etc.): override the below via env vars:
# - CAP_AWS_ACCESS_KEY, CAP_AWS_SECRET_KEY, CAP_AWS_BUCKET, CAP_AWS_REGION
# - CAP_AWS_ENDPOINT, S3_PUBLIC_ENDPOINT, S3_INTERNAL_ENDPOINT
# - S3_PATH_STYLE=true (R2/most S3-compatible) or false (AWS S3 virtual-hosted style)
# If using a remote bucket exclusively, you can remove/disable the `cap-s3` service and its dependency.
services:
cap-web:
container_name: cap-web
image: 'ghcr.io/capsoftware/cap-web:latest'
restart: unless-stopped
environment:
- SERVICE_FQDN_CAP_3000
- 'DATABASE_URL=mysql://$SERVICE_USER_MYSQL:$SERVICE_PASSWORD_MYSQL@cap-db:3306/${MYSQL_DATABASE:-planetscale}'
- 'WEB_URL=${SERVICE_FQDN_CAP_3000}'
- 'NEXTAUTH_URL=${SERVICE_FQDN_CAP_3000}'
- 'DATABASE_ENCRYPTION_KEY=${SERVICE_PASSWORD_64_DATABASEENCRYPTIONKEY}'
- 'NEXTAUTH_SECRET=${SERVICE_PASSWORD_64_NEXTAUTHSECRET}'
- 'CAP_AWS_ACCESS_KEY=${CAP_AWS_ACCESS_KEY:-$SERVICE_USER_MINIO}'
- 'CAP_AWS_SECRET_KEY=${CAP_AWS_SECRET_KEY:-$SERVICE_PASSWORD_MINIO}'
- 'CAP_AWS_BUCKET=${CAP_AWS_BUCKET:-capso}'
- 'CAP_AWS_REGION=${CAP_AWS_REGION:-us-east-1}'
- 'S3_PUBLIC_ENDPOINT=${S3_PUBLIC_ENDPOINT:-$SERVICE_FQDN_CAPS3_3902}'
- 'S3_INTERNAL_ENDPOINT=${S3_INTERNAL_ENDPOINT:-$SERVICE_FQDN_CAPS3_3902}'
- 'NEXT_RUNTIME=nodejs'
- 'S3_PATH_STYLE=${S3_PATH_STYLE:-true}'
- 'CAP_AWS_ENDPOINT=${CAP_AWS_ENDPOINT:-$SERVICE_FQDN_CAPS3_3902}'
depends_on:
cap-db:
condition: service_healthy
cap-s3:
condition: service_healthy
cap-db:
container_name: cap-db
image: 'mysql:8.0'
restart: unless-stopped
environment:
- 'MYSQL_USER=${SERVICE_USER_MYSQL}'
- 'MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL}'
- 'MYSQL_DATABASE=${MYSQL_DATABASE:-planetscale}'
- 'MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQLROOT}'
- 'MYSQL_ALLOW_EMPTY_PASSWORD=${MYSQL_ALLOW_EMPTY_PASSWORD:-yes}'
command:
- '--max_connections=1000'
- '--default-authentication-plugin=mysql_native_password'
healthcheck:
test:
- CMD
- mysqladmin
- ping
- '-h'
- 127.0.0.1
interval: 10s
timeout: 10s
retries: 5
volumes:
- 'cap_db:/var/lib/mysql'
cap-s3:
container_name: cap-s3
image: 'bitnami/minio:latest'
restart: unless-stopped
environment:
- SERVICE_FQDN_CAPS3_3902
- MINIO_API_PORT_NUMBER=3902
- MINIO_CONSOLE_PORT_NUMBER=3903
- MINIO_ROOT_USER=$SERVICE_USER_MINIO
- MINIO_ROOT_PASSWORD=$SERVICE_PASSWORD_MINIO
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:3902/minio/health/live'
interval: 10s
timeout: 10s
retries: 5
volumes:
- 'cap_s3:/bitnami/minio/data'