From a6f7391119c77eaa5cf7f96e91b64a6bcea5f53a Mon Sep 17 00:00:00 2001 From: Puru D Date: Sun, 19 May 2024 04:28:32 -0500 Subject: [PATCH] feat: update self-hosting documentation --- SELF-HOSTING.md | 38 +++++++++++++++++++++++++++++++++++++- fly.toml | 2 +- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/SELF-HOSTING.md b/SELF-HOSTING.md index 4c34ce89c..9d92015a4 100644 --- a/SELF-HOSTING.md +++ b/SELF-HOSTING.md @@ -39,6 +39,27 @@ UPLOAD_BUCKET_PUBLIC="public-bucket-name" UPLOAD_BUCKET_PRIVATE="private-bucket-name" ``` +- **Run the docker container**: + +```bash +docker run -d \ + -e NODE_ENV="replace" \ + -e DATABASE_URL="replace" \ + -e NEXTAUTH_SECRET="replace" \ + -e NEXTAUTH_URL="replace" \ + -e NEXT_PUBLIC_BASE_URL="replace" \ + -e EMAIL_FROM="replace" \ + -e EMAIL_SERVER="replace" \ + -e UPLOAD_REGION="replace" \ + -e UPLOAD_ENDPOINT="replace" \ + -e UPLOAD_ACCESS_KEY_ID="replace" \ + -e UPLOAD_SECRET_ACCESS_KEY="replace" \ + -e UPLOAD_BUCKET_PUBLIC="replace" \ + -e UPLOAD_BUCKET_PRIVATE="replace" \ + -p 3000:3000 \ + captable/captable +``` + - **Setup CORS for file uploads**:\ Some of the services including Cloudflare R2 may require you to setup CORS for file uploads.\ @@ -62,4 +83,19 @@ UPLOAD_BUCKET_PRIVATE="private-bucket-name" ] } ] -``` \ No newline at end of file +``` + +- **Run database migrations**: + +```bash +docker exec -it npx prisma migrate deploy +``` + + +- **Access the application**:\ + Open your browser and navigate to `https://your-domain.com` + +- **Questions?**\ + If you have any questions, please schedule a call with us, and we will help you set up your own instance. + + Book us diff --git a/fly.toml b/fly.toml index c57e88bae..e7c2f2557 100644 --- a/fly.toml +++ b/fly.toml @@ -26,7 +26,7 @@ cpus = 1 [deploy] strategy = "canary" -release_command = "sh ./scripts/migrate.sh" +# release_command = "sh ./scripts/migrate.sh" [env] NODE_ENV = "production"