Files
colanode/docker-compose.yaml
2025-05-05 14:56:34 +02:00

202 lines
9.1 KiB
YAML

version: '3.8'
services:
postgres:
image: pgvector/pgvector:pg17
container_name: colanode_postgres
restart: always
environment:
POSTGRES_USER: colanode_user
POSTGRES_PASSWORD: postgrespass123
POSTGRES_DB: colanode_db
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- '5432:5432'
networks:
- colanode_network
valkey:
image: valkey/valkey:8.1
container_name: colanode_valkey
restart: always
command: ['valkey-server', '--requirepass', 'your_valkey_password']
volumes:
- valkey_data:/data
ports:
- '6379:6379'
networks:
- colanode_network
minio:
image: minio/minio:RELEASE.2025-04-08T15-41-24Z
container_name: colanode_minio
restart: always
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: your_minio_password
MINIO_BROWSER: 'on'
MINIO_DOMAIN: minio
MINIO_ADDRESS: ':9000'
MINIO_CONSOLE_ADDRESS: ':9001'
volumes:
- minio_data:/data
ports:
- '9000:9000'
- '9001:9001'
entrypoint: sh
command: -c 'mkdir -p /data/colanode-avatars /data/colanode-files && minio server /data --address ":9000" --console-address ":9001"'
networks:
- colanode_network
# ---------------------------------------------------------------
# Optional SMTP Server (Mailpit) for Local Email Testing
# ---------------------------------------------------------------
# This service runs Mailpit, a local SMTP testing tool.
# If you want to test how emails are sent in the 'server' service,
# you can uncomment the 'smtp' service block and configure the
# SMTP_ENABLED variable to 'true' in the 'server' service environment
# variables.
#
# Access the Mailpit UI at http://localhost:8025
# ---------------------------------------------------------------
# smtp:
# image: axllent/mailpit:v1.24.1
# container_name: colanode_smtp
# restart: always
# ports:
# - '1025:1025' # SMTP IN (Connect server service to this port)
# - '8025:8025' # Web UI
# networks:
# - colanode_network
server:
build:
context: .
dockerfile: apps/server/Dockerfile
image: colanode_server
container_name: colanode_server
restart: always
depends_on:
- postgres
- valkey
- minio
# - smtp # Optional
environment:
# ───────────────────────────────────────────────────────────────
# General Node/Server Config
# ───────────────────────────────────────────────────────────────
NODE_ENV: production
PORT: 3000
# The server requires a name and avatar URL which will be displayed in the desktop app login screen.
SERVER_NAME: 'Colanode Local'
SERVER_AVATAR: ''
# Possible values for SERVER_MODE: 'standalone', 'cluster'
SERVER_MODE: 'standalone'
# ───────────────────────────────────────────────────────────────
# Account Configuration
# ───────────────────────────────────────────────────────────────
# Possible values for ACCOUNT_VERIFICATION_TYPE: 'automatic', 'manual', 'email'
ACCOUNT_VERIFICATION_TYPE: 'automatic'
ACCOUNT_OTP_TIMEOUT: '600' # in seconds
ACCOUNT_ALLOW_GOOGLE_LOGIN: 'false'
# ───────────────────────────────────────────────────────────────
# User Configuration
# ───────────────────────────────────────────────────────────────
USER_STORAGE_LIMIT: '10737418240' # 10 GB
USER_MAX_FILE_SIZE: '104857600' # 100 MB
# ───────────────────────────────────────────────────────────────
# PostgreSQL Configuration
# ───────────────────────────────────────────────────────────────
# The server expects a PostgreSQL database with the pgvector extension installed.
POSTGRES_URL: 'postgres://colanode_user:postgrespass123@postgres:5432/colanode_db'
# Optional variables for SSL connection to the database
POSTGRES_SSL_REJECT_UNAUTHORIZED: 'false'
POSTGRES_SSL_CA: ''
POSTGRES_SSL_KEY: ''
POSTGRES_SSL_CERT: ''
# ───────────────────────────────────────────────────────────────
# Redis Configuration
# ───────────────────────────────────────────────────────────────
REDIS_URL: 'redis://:your_valkey_password@valkey:6379/0'
REDIS_DB: '0'
# Optional variables:
REDIS_JOBS_QUEUE_NAME: 'jobs'
REDIS_JOBS_QUEUE_PREFIX: 'colanode'
REDIS_EVENTS_CHANNEL: 'events'
# ───────────────────────────────────────────────────────────────
# S3 Configuration for Avatars
# ───────────────────────────────────────────────────────────────
S3_AVATARS_ENDPOINT: 'http://minio:9000'
S3_AVATARS_ACCESS_KEY: 'minioadmin'
S3_AVATARS_SECRET_KEY: 'your_minio_password'
S3_AVATARS_BUCKET_NAME: 'colanode-avatars'
S3_AVATARS_REGION: 'us-east-1'
S3_AVATARS_FORCE_PATH_STYLE: 'true'
# ───────────────────────────────────────────────────────────────
# S3 Configuration for Files
# ───────────────────────────────────────────────────────────────
S3_FILES_ENDPOINT: 'http://minio:9000'
S3_FILES_ACCESS_KEY: 'minioadmin'
S3_FILES_SECRET_KEY: 'your_minio_password'
S3_FILES_BUCKET_NAME: 'colanode-files'
S3_FILES_REGION: 'us-east-1'
S3_FILES_FORCE_PATH_STYLE: 'true'
# ───────────────────────────────────────────────────────────────
# SMTP configuration
# ---------------------------------------------------------------
# We leave the SMTP configuration disabled by default.
# ---------------------------------------------------------------
SMTP_ENABLED: 'false'
# ---------------------------------------------------------------
# If using the local Mailpit service (defined above), use:
# SMTP_ENABLED: 'true'
# SMTP_HOST: 'smtp'
# SMTP_PORT: '1025'
# SMTP_USER: ''
# SMTP_PASSWORD: ''
# SMTP_EMAIL_FROM: 'your_email@example.com'
# SMTP_EMAIL_FROM_NAME: 'Colanode'
# ---------------------------------------------------------------
# If using a real SMTP provider, update these:
# SMTP_ENABLED: 'true'
# SMTP_HOST: 'your_smtp_provider_host'
# SMTP_PORT: '587' # Or 465, etc.
# SMTP_USER: 'your_smtp_username'
# SMTP_PASSWORD: 'your_smtp_password'
# SMTP_EMAIL_FROM: 'your_email@example.com'
# SMTP_EMAIL_FROM_NAME: 'Colanode'
# ---------------------------------------------------------------
# ───────────────────────────────────────────────────────────────
# AI Configuration
# ---------------------------------------------------------------
# The AI integration is in experimental mode yet and we don't
# recommend using it.
# ---------------------------------------------------------------
AI_ENABLED: 'false'
# ───────────────────────────────────────────────────────────────
ports:
- '3000:3000'
networks:
- colanode_network
volumes:
postgres_data:
valkey_data:
minio_data:
networks:
colanode_network:
driver: bridge