72 lines
2.2 KiB
YAML
72 lines
2.2 KiB
YAML
name: rustbox
|
|
|
|
services:
|
|
mysql:
|
|
image: mysql:8.4
|
|
environment:
|
|
MYSQL_DATABASE: rustbox
|
|
MYSQL_USER: rustbox
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-rustbox-dev-password}
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rustbox-root-password}
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p${MYSQL_ROOT_PASSWORD:-rustbox-root-password}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
volumes:
|
|
- mysql-data:/var/lib/mysql
|
|
|
|
opensearch:
|
|
image: opensearchproject/opensearch:3.9.0
|
|
environment:
|
|
discovery.type: single-node
|
|
DISABLE_INSTALL_DEMO_CONFIG: "true"
|
|
DISABLE_SECURITY_PLUGIN: "true"
|
|
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -fsS http://localhost:9200/_cluster/health >/dev/null || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 30
|
|
volumes:
|
|
- opensearch-data:/usr/share/opensearch/data
|
|
|
|
rustbox:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
opensearch:
|
|
condition: service_healthy
|
|
ports:
|
|
- "${PORT:-3001}:${PORT:-3001}"
|
|
environment:
|
|
RUSTBOX_CONFIG: /etc/rustbox/rustbox.toml
|
|
ENVIRONMENT: ${ENVIRONMENT:-development}
|
|
HOST: ${HOST:-0.0.0.0}
|
|
PORT: ${PORT:-3001}
|
|
IMAP_HOST: ${IMAP_HOST:-mail.example.com}
|
|
IMAP_PORT: ${IMAP_PORT:-993}
|
|
SMTP_HOST: ${SMTP_HOST:-mail.example.com}
|
|
SMTP_PORT: ${SMTP_PORT:-587}
|
|
TLS_ENABLED: ${TLS_ENABLED:-true}
|
|
RUST_LOG: ${RUST_LOG:-warn,rustbox=info,tower_http=info}
|
|
DATABASE_URL: mysql://rustbox:${MYSQL_PASSWORD:-rustbox-dev-password}@mysql:3306/rustbox
|
|
SESSION_ENCRYPTION_KEY: ${SESSION_ENCRYPTION_KEY:-MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=}
|
|
volumes:
|
|
- ./configs/mysql-nfs-opensearch.toml:/etc/rustbox/rustbox.toml:ro
|
|
- rustbox-nfs:/mnt/rustbox-shared
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
mysql-data:
|
|
opensearch-data:
|
|
rustbox-nfs:
|
|
driver: local
|
|
driver_opts:
|
|
type: nfs
|
|
o: addr=${NFS_SERVER:?set NFS_SERVER},rw,nfsvers=4
|
|
device: :${NFS_EXPORT:-/rustbox}
|