Description
I followed the self-hosting guide at https://happy.engineering/docs/guides/self-hosting/ to deploy the server using Docker Compose, but the provided configuration is incomplete and results in multiple runtime crashes.
Steps to Reproduce
- Copy the
docker-compose.yml from the documentation.
- Run
docker-compose up.
Issues Encountered
1. Missing MinIO/S3 Configuration
The application crashes immediately on startup with InvalidEndpointError because it requires an S3-compatible storage service, but the provided docker-compose.yml does not include a MinIO service, nor does the documentation mention how to configure the required S3 environment variables (S3_HOST, S3_BUCKET, etc.).
Error Log:
/app/node_modules/minio/dist/esm/internal/client.ts:238
throw new errors.InvalidEndpointError(Invalid endPoint : ${params.endPoint})
InvalidEndpointError: Invalid endPoint : undefined
2. Missing Encryption Key
After manually fixing the S3 issue, the application crashes again due to a missing HANDY_MASTER_SECRET environment variable, which is required for privacy-kit.
Error Log:
TypeError [ERR_INVALID_ARG_TYPE]: The "password" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, or DataView. Received undefined
at Object.deriveSecureKey (file:///app/node_modules/privacy-kit/dist/index.mjs:2440:16)
3. Database Schema Not Initialized
The guide does not mention that database migrations need to be run manually. The container starts but logs continuous errors because the database tables do not exist.
Error Log:
Invalid prisma.account.count() invocation:
The table public.Account does not exist in the current database.
4. Incorrect Networking
The DATABASE_URL and REDIS_URL in the provided example use localhost, which fails within the Docker network. They should point to the service names (postgres and redis).
Suggested Fix
Please update the documentation and the provided docker-compose.yml to:
- Include a MinIO service configuration.
- Add necessary environment variables (
S3_*, HANDY_MASTER_SECRET).
- Correct the network hostnames for Postgres and Redis.
- Add instructions to run
npx prisma migrate deploy after the containers are up.
Description
I followed the self-hosting guide at https://happy.engineering/docs/guides/self-hosting/ to deploy the server using Docker Compose, but the provided configuration is incomplete and results in multiple runtime crashes.
Steps to Reproduce
docker-compose.ymlfrom the documentation.docker-compose up.Issues Encountered
1. Missing MinIO/S3 Configuration
The application crashes immediately on startup with
InvalidEndpointErrorbecause it requires an S3-compatible storage service, but the provideddocker-compose.ymldoes not include a MinIO service, nor does the documentation mention how to configure the required S3 environment variables (S3_HOST,S3_BUCKET, etc.).Error Log:
/app/node_modules/minio/dist/esm/internal/client.ts:238
throw new errors.InvalidEndpointError(Invalid endPoint : ${params.endPoint})
InvalidEndpointError: Invalid endPoint : undefined
2. Missing Encryption Key
After manually fixing the S3 issue, the application crashes again due to a missing
HANDY_MASTER_SECRETenvironment variable, which is required forprivacy-kit.Error Log:
TypeError [ERR_INVALID_ARG_TYPE]: The "password" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, or DataView. Received undefined
at Object.deriveSecureKey (file:///app/node_modules/privacy-kit/dist/index.mjs:2440:16)
3. Database Schema Not Initialized
The guide does not mention that database migrations need to be run manually. The container starts but logs continuous errors because the database tables do not exist.
Error Log:
Invalid prisma.account.count() invocation:
The table public.Account does not exist in the current database.
4. Incorrect Networking
The
DATABASE_URLandREDIS_URLin the provided example uselocalhost, which fails within the Docker network. They should point to the service names (postgresandredis).Suggested Fix
Please update the documentation and the provided
docker-compose.ymlto:S3_*,HANDY_MASTER_SECRET).npx prisma migrate deployafter the containers are up.