Skip to content

The Open Source DocuSign Alternative.

1.5 KB
Raw Blame
#!/bin/sh

# πŸš€ Starting Documenso...
printf "πŸš€ Starting Documenso...\n\n"

# πŸ” Check certificate configuration
printf "πŸ” Checking certificate configuration...\n"

CERT_PATH="${NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH:-/opt/documenso/cert.p12}"

if [ -f "$CERT_PATH" ] && [ -r "$CERT_PATH" ]; then
    printf "βœ… Certificate file found and readable - document signing is ready!\n"
else
    printf "⚠️ Certificate not found or not readable\n"
    printf "πŸ’‘ Tip: Documenso will still start, but document signing will be unavailable\n"
    printf "πŸ”§ Check: http://localhost:3000/api/certificate-status for detailed status\n"
fi

printf "\nπŸ“š Useful Links:\n"
printf "πŸ“– Documentation: https://docs.documenso.com\n"
printf "🐳 Self-hosting guide: https://docs.documenso.com/developers/self-hosting\n"
printf "πŸ” Certificate setup: https://docs.documenso.com/developers/self-hosting/signing-certificate\n"
printf "πŸ₯ Health check: http://localhost:3000/api/health\n"
printf "πŸ“Š Certificate status: http://localhost:3000/api/certificate-status\n"
printf "πŸ‘₯ Community: https://github.com/documenso/documenso\n\n"

# The Prisma schema requires a direct URL. Without a connection pooler, it is the same as the database URL.
export NEXT_PRIVATE_DIRECT_DATABASE_URL="${NEXT_PRIVATE_DIRECT_DATABASE_URL:-$NEXT_PRIVATE_DATABASE_URL}"

printf "πŸ—„οΈ  Running database migrations...\n"
npx prisma migrate deploy --schema ../../packages/prisma/schema.prisma

printf "🌟 Starting Documenso server...\n"
HOSTNAME=0.0.0.0 node build/server/main.js