Files
runtipi/apps/onlyoffice-docs/docker-compose.json

133 lines
3.8 KiB
JSON

{
"$schema": "https://schemas.runtipi.io/dynamic-compose.json",
"schemaVersion": 2,
"services": [
{
"name": "onlyoffice-docs",
"image": "onlyoffice/documentserver:8.2",
"isMain": true,
"internalPort": 80,
"dependsOn": {
"onlyoffice-docs-db": {
"condition": "service_healthy"
},
"onlyoffice-docs-redis": {
"condition": "service_healthy"
},
"onlyoffice-docs-rabbitmq": {
"condition": "service_healthy"
}
},
"environment": {
"JWT_ENABLED": "${ONLYOFFICE_JWT_ENABLED:-true}",
"JWT_SECRET": "${ONLYOFFICE_JWT_SECRET}",
"JWT_HEADER": "${ONLYOFFICE_JWT_HEADER:-Authorization}",
"JWT_IN_BODY": "${ONLYOFFICE_JWT_IN_BODY:-false}",
"USE_UNAUTHORIZED_STORAGE": "${ONLYOFFICE_USE_UNAUTHORIZED_STORAGE:-false}",
"WOPI_ENABLED": "${ONLYOFFICE_WOPI_ENABLED:-false}",
"NGINX_WORKER_PROCESSES": "auto",
"NGINX_WORKER_CONNECTIONS": "4096",
"GENERATE_FONTS": "true",
"DB_TYPE": "postgres",
"DB_HOST": "onlyoffice-docs-db",
"DB_PORT": "5432",
"DB_NAME": "onlyoffice",
"DB_USER": "onlyoffice",
"DB_PWD": "${ONLYOFFICE_DB_PASSWORD}",
"REDIS_SERVER_HOST": "onlyoffice-docs-redis",
"REDIS_SERVER_PORT": "6379",
"AMQP_URI": "amqp://${ONLYOFFICE_RABBITMQ_USER:-onlyoffice}:${ONLYOFFICE_RABBITMQ_PASSWORD}@onlyoffice-docs-rabbitmq:5672/",
"AMQP_TYPE": "rabbitmq"
},
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/logs",
"containerPath": "/var/log/onlyoffice"
},
{
"hostPath": "${APP_DATA_DIR}/data/data",
"containerPath": "/var/www/onlyoffice/Data"
},
{
"hostPath": "${APP_DATA_DIR}/data/lib",
"containerPath": "/var/lib/onlyoffice"
},
{
"hostPath": "${APP_DATA_DIR}/data/fonts",
"containerPath": "/usr/share/fonts/truetype/custom"
}
],
"healthCheck": {
"test": "curl -f http://localhost/healthcheck",
"interval": "30s",
"timeout": "10s",
"retries": 3,
"startPeriod": "60s"
}
},
{
"name": "onlyoffice-docs-db",
"image": "postgres:15-alpine",
"isMain": false,
"environment": {
"POSTGRES_DB": "onlyoffice",
"POSTGRES_USER": "onlyoffice",
"POSTGRES_PASSWORD": "${ONLYOFFICE_DB_PASSWORD}"
},
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/postgresql",
"containerPath": "/var/lib/postgresql/data"
}
],
"healthCheck": {
"test": "pg_isready -U onlyoffice -d onlyoffice",
"interval": "10s",
"timeout": "5s",
"retries": 5,
"startPeriod": "10s"
}
},
{
"name": "onlyoffice-docs-redis",
"image": "redis:7-alpine",
"isMain": false,
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/redis",
"containerPath": "/data"
}
],
"healthCheck": {
"test": "redis-cli ping",
"interval": "10s",
"timeout": "5s",
"retries": 5,
"startPeriod": "10s"
}
},
{
"name": "onlyoffice-docs-rabbitmq",
"image": "rabbitmq:3-alpine",
"isMain": false,
"environment": {
"RABBITMQ_DEFAULT_USER": "${ONLYOFFICE_RABBITMQ_USER:-onlyoffice}",
"RABBITMQ_DEFAULT_PASS": "${ONLYOFFICE_RABBITMQ_PASSWORD}"
},
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/rabbitmq",
"containerPath": "/var/lib/rabbitmq"
}
],
"healthCheck": {
"test": "rabbitmq-diagnostics -q ping",
"interval": "10s",
"timeout": "5s",
"retries": 5,
"startPeriod": "30s"
}
}
]
}