W
Wasp-langā€¢3mo ago
Cubs

How do I re-deploy on Fly.io but use the same database and DNS settings that my current domain is on

Help please
34 Replies
kapa.ai
kapa.aiā€¢3mo ago
Hi @Cubs. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To re-deploy your Wasp app on Fly.io while using the same database and DNS settings, you need to follow these steps: 1. Rebuild your Wasp app: Run wasp build. This will rebuild your Wasp app and remove your .wasp/build/ directory. If you have a fly.toml from any prior Fly.io deployments in there, it will be removed. 2. Restore your fly.toml file: After rebuilding your app, you need to restore your fly.toml file. You have a few options here: - If you have copied the fly.toml file to a versioned directory (like your Wasp project dir), you can reference it in flyctl deploy --config <path> commands. - If you have backed up the fly.toml file somewhere before running wasp build, you can copy it into .wasp/build/ after rebuilding your app. When the fly.toml file exists in .wasp/build/ dir, you do not need to specify the --config <path>. - You can run flyctl config save -a <app-name> to regenerate the fly.toml file from the remote state stored in Fly.io. 3. Re-deploy your app: While still in the .wasp/build/ directory, run flyctl deploy --remote-only --config ../../fly.toml. This will build and deploy the backend of your Wasp app on Fly.io. Please note that you should only run create-db once per app. If you run it multiple times, it will create multiple databases, but your app needs only one. So, you don't need to run create-db again when re-deploying your app. For DNS settings, if you have set up a custom domain for your app, you don't need to change the DNS records for your domain when re-deploying your app. The DNS records should remain the same as long as your app is deployed to the same Fly.io app. Here are the relevant knowledge sources: - Redeploying After Wasp Builds (https://wasp-lang.dev/docs/advanced/deployment/manually#redeploying-after-wasp-builds) - Deploy to a Fly.io App (https://wasp-lang.dev/docs/advanced/deployment/manually#deploy-to-a-flyio-app) - create-db (https://wasp-lang.dev/docs/advanced/deployment/cli#create-db) - Using a Custom Domain For Your App (https://wasp-lang.dev/docs/advanced/deployment/cli#using-a-custom-domain-for-your-app) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
how do I deploy with toml in the right path? @kapa.ai how do I deploy with toml in the right path?
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To deploy with the fly.toml file in the correct path, you need to follow these steps: 1. Rebuild your Wasp app: Run wasp build. This will rebuild your Wasp app and remove your .wasp/build/ directory. If you have a fly.toml from any prior Fly.io deployments in there, it will be removed. 2. Restore your fly.toml file: After rebuilding your app, you need to restore your fly.toml file. You have a few options here: - If you have copied the fly.toml file to a versioned directory (like your Wasp project dir), you can reference it in flyctl deploy --config <path> commands. - If you have backed up the fly.toml file somewhere before running wasp build, you can copy it into .wasp/build/ after rebuilding your app. When the fly.toml file exists in .wasp/build/ dir, you do not need to specify the --config <path>. - You can run flyctl config save -a <app-name> to regenerate the fly.toml file from the remote state stored in Fly.io. 3. Deploy your app: While still in the .wasp/build/ directory, run flyctl deploy --remote-only --config ../../fly.toml. This will build and deploy the backend of your Wasp app on Fly.io. Here are the relevant knowledge sources: - Redeploying After Wasp Builds (https://wasp-lang.dev/docs/advanced/deployment/manually#redeploying-after-wasp-builds) - Deploy to a Fly.io App (https://wasp-lang.dev/docs/advanced/deployment/manually#deploy-to-a-flyio-app) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
why the config flag @kapa.ai
MEE6
MEE6ā€¢3mo ago
Wohooo @Cubs, you just became a Waspeteer level 1!
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The --config flag is used with the flyctl deploy command to specify the path to the fly.toml configuration file. This is particularly useful when the fly.toml file is not located in the default location (which is the current directory). In the context of a Wasp project, the fly.toml file might not be in the .wasp/build/ directory (which is where you run the flyctl deploy command from) because the wasp build command removes the .wasp/build/ directory. Therefore, you might have the fly.toml file stored somewhere else, and you need to tell flyctl deploy where to find it. That's what the --config flag is for. For example, if you have the fly.toml file in your project root directory, you would use the --config flag like this:
flyctl deploy --remote-only --config ../../fly.toml
flyctl deploy --remote-only --config ../../fly.toml
This tells flyctl deploy to look for the fly.toml file two directories up from the current directory. Here are the relevant knowledge sources: - Redeploying After Wasp Builds (https://wasp-lang.dev/docs/advanced/deployment/manually#redeploying-after-wasp-builds) - Deploy to a Fly.io App (https://wasp-lang.dev/docs/advanced/deployment/manually#deploy-to-a-flyio-app) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
will this affect my local db and other settings by running wasp build again? @kapa.ai
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- Running wasp build will not affect your local database or other settings. The wasp build command is used to compile your Wasp project and generate the code for deployment. It does not interact with your local database or modify your settings. However, it's important to note that wasp build will remove the .wasp/build/ directory, which may contain files like fly.toml from prior deployments. If you want to keep these files, you should back them up before running wasp build. Here are the relevant knowledge sources: - Redeploying After Wasp Builds (https://wasp-lang.dev/docs/advanced/deployment/manually#redeploying-after-wasp-builds) - Github Issue: Clean up /build dir before wasp build (https://github.com/wasp-lang/wasp/issues/210) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
Do I need to pass along the .env.server and .env variables with the deploy command or are those saved from last time? @kapa.ai
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- When deploying your Wasp project, you don't need to pass the .env.server and .env variables with the deploy command. These files are used for defining environment variables during development. However, for production, you need to provide environment variables differently. For server-side environment variables, you provide them based on where you deploy your project. If you're deploying on Fly.io, for example, you can define them using the flyctl CLI tool:
flyctl secrets set SOME_VAR_NAME=somevalue
flyctl secrets set SOME_VAR_NAME=somevalue
For client-side environment variables, they are embedded into the client code during the build and shipping process. You should provide them to the build command, for example:
REACT_APP_SOME_VAR_NAME=somevalue npm run build
REACT_APP_SOME_VAR_NAME=somevalue npm run build
Remember, client-side environment variables are public and readable by anyone, so you should never store secrets in them. Here are the relevant knowledge sources: - Defining Env Vars in Production (https://wasp-lang.dev/docs/project/env-vars#defining-env-vars-in-production) - Defining Env Vars in Development (https://wasp-lang.dev/docs/project/env-vars#defining-env-vars-in-development) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
(base) āžœ app flyctl deploy --remote-only ==> Verifying app config Validating /Users/ryannovak/CODE/SaaS/recipes-and-groceries/app/fly.toml āœ“ Configuration is valid --> Verified app config ==> Building image Remote builder fly-builder-lingering-dew-4858 ready ==> Building image šŸ‘€ checking remote builder compatibility with wiregu āœ“ compatible remote builder found INFO Override builder host with: https://fly-builder-lingering-dew-4858.fly.dev (was tcp://[fdaa:9:e465:a7b:182:a342:5eef:2]:2375) Remote builder fly-builder-lingering-dew-4858 ready Error: failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See https://fly.io/docs/reference/configuration/#the-build-section @kapa.ai
Fly
Fly Launch configuration (fly.toml)
Documentation and guides from the team at Fly.io.
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The error message you're seeing indicates that the deployment process can't find a Dockerfile or buildpacks configuration for your app. This is required for building a Docker image of your app for deployment. In a Wasp project, a Dockerfile is automatically generated during the build process. You can customize this Dockerfile by creating your own in the project's root directory. If a Dockerfile is found in the project's root, Wasp will append its contents at the bottom of the default Dockerfile. Here's how you can resolve this issue: 1. Run wasp build in your project's root directory. This will generate the necessary Dockerfile in the .wasp/build/ directory. 2. If you have a custom Dockerfile, make sure it's located in your project's root directory. Wasp will append its contents to the default Dockerfile during the build process. 3. After running wasp build, change into the .wasp/build/ directory and then run the flyctl deploy --remote-only command. Here's what these steps look like in code:
wasp build
cd .wasp/build/
flyctl deploy --remote-only
wasp build
cd .wasp/build/
flyctl deploy --remote-only
If you're still having issues, you can check what your project's Dockerfile will look like by running wasp dockerfile. Here are the relevant knowledge sources: - Customizing the Dockerfile (https://wasp-lang.dev/docs/advanced/deployment/overview#customizing-the-dockerfile) - Redeploying After Wasp Builds (https://wasp-lang.dev/docs/advanced/deployment/manually#redeploying-after-wasp-builds) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
okay that redeployed the back end server, how do I re deploy the front end too? @kapa.ai how do I deploy the front and back end redeploy when I want to merge all my changes to prod
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To deploy both the frontend and backend of your Wasp app when you want to merge all your changes to production, you can follow these steps: 1. Rebuild your Wasp app: Run wasp build in your project's root directory. This will generate the deployable code for both the frontend and backend of your app in the .wasp/build/ directory.
wasp build
wasp build
2. Deploy the backend: The exact steps for deploying the backend depend on your hosting provider. For example, if you're using Heroku, you would navigate to the .wasp/build/ directory, log in to the Heroku Container Registry, build the Docker image, push it to Heroku, and then release it:
cd .wasp/build/
heroku container:login
heroku container:push --app <app-name> web
heroku container:release --app <app-name> web
cd .wasp/build/
heroku container:login
heroku container:push --app <app-name> web
heroku container:release --app <app-name> web
3. Deploy the frontend: The frontend of a Wasp app is a set of static files that can be deployed to any static hosting provider. To build the frontend, navigate to the .wasp/build/web-app directory and run the build command:
cd .wasp/build/web-app
npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build
cd .wasp/build/web-app
npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build
Then, you can deploy the built files to your static hosting provider. 4. Redeploy: If you want to redeploy your app with the latest changes, you would repeat these steps. Remember to back up any files in the .wasp/build/ directory that you want to keep, as wasp build will remove this directory. Here are the relevant knowledge sources: - Generating Deployable Code (https://wasp-lang.dev/docs/advanced/deployment/manually#1-generating-deployable-code) - Deploying the API Server (backend) (https://wasp-lang.dev/docs/advanced/deployment/manually#2-deploying-the-api-server-backend) - Deploying the Web Client (frontend) (https://wasp-lang.dev/docs/advanced/deployment/manually#3-deploying-the-web-client-frontend) - Updates & Redeploying (https://wasp-lang.dev/docs/advanced/deployment/manually#updates--redeploying) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
how do I redeploy the saas template front and back end on fly.io and not overwrite my domain hosting and dns @kapa.ai
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To redeploy the SaaS template frontend and backend on Fly.io without overwriting your domain hosting and DNS, you can follow these steps: 1. Rebuild your Wasp app: Run wasp build in your project's root directory. This will generate the deployable code for both the frontend and backend of your app in the .wasp/build/ directory.
wasp build
wasp build
2. Restore your fly.toml file: After rebuilding your app, you need to restore your fly.toml file. You have a few options here: - If you have copied the fly.toml file to a versioned directory (like your Wasp project dir), you can reference it in flyctl deploy --config <path> commands. - If you have backed up the fly.toml file somewhere before running wasp build, you can copy it into .wasp/build/ after rebuilding your app. When the fly.toml file exists in .wasp/build/ dir, you do not need to specify the --config <path>. - You can run flyctl config save -a <app-name> to regenerate the fly.toml file from the remote state stored in Fly.io. 3. Deploy your app: While still in the .wasp/build/ directory, run flyctl deploy --remote-only --config ../../fly.toml. This will build and deploy the backend of your Wasp app on Fly.io.
cd .wasp/build/
flyctl deploy --remote-only --config ../../fly.toml
cd .wasp/build/
flyctl deploy --remote-only --config ../../fly.toml
4. Redeploy the frontend: If you're using a static hosting provider like Netlify for your frontend, you can redeploy your frontend there. The exact steps depend on your hosting provider. Please note that you should only run create-db once per app. If you run it multiple times, it will create multiple databases, but your app needs only one. So, you don't need to run create-db again when re-deploying your app. For DNS settings, if you have set up a custom domain for your app, you don't need to change the DNS records for your domain when re-deploying your app. The DNS records should remain the same as long as your app is deployed to the same Fly.io app. Here are the relevant knowledge sources: - Redeploying After Wasp Builds (https://wasp-lang.dev/docs/advanced/deployment/manually#redeploying-after-wasp-builds) - Deploy to a Fly.io App (https://wasp-lang.dev/docs/advanced/deployment/manually#deploy-to-a-flyio-app) - create-db (https://wasp-lang.dev/docs/advanced/deployment/cli#create-db) - Using a Custom Domain For Your App (https://wasp-lang.dev/docs/advanced/deployment/cli#using-a-custom-domain-for-your-app) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
the front and back end are both deployed on fly, I did it with one deploy command, help me re-deploy that entire thing the front and back end are both deployed on fly, I did it with one deploy command, help me re-deploy that entire thing @kapa.ai
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To redeploy both the frontend and backend of your Wasp app on Fly.io with a single command, you can use the wasp deploy fly deploy command. Here are the steps: 1. Rebuild your Wasp app: Run wasp build in your project's root directory. This will generate the deployable code for both the frontend and backend of your app in the .wasp/build/ directory.
wasp build
wasp build
2. Restore your fly.toml files: After rebuilding your app, you need to restore your fly.toml files for both the server and client. If you have copied these files to a versioned directory (like your Wasp project dir), you can reference them in flyctl deploy --config <path> commands. If you have backed up these files somewhere before running wasp build, you can copy them into .wasp/build/ after rebuilding your app. 3. Redeploy your app: Run the wasp deploy fly deploy command. This will redeploy both the frontend and backend of your Wasp app on Fly.io.
wasp deploy fly deploy
wasp deploy fly deploy
Please note that you should only run create-db once per app. If you run it multiple times, it will create multiple databases, but your app needs only one. So, you don't need to run create-db again when re-deploying your app. Here are the relevant knowledge sources: - Redeploying After Wasp Builds (https://wasp-lang.dev/docs/advanced/deployment/manually#redeploying-after-wasp-builds) - Deploying with the Wasp CLI (https://wasp-lang.dev/docs/advanced/deployment/cli#deploying) - deploy command (https://wasp-lang.dev/docs/advanced/deployment/cli#deploy) - create-db (https://wasp-lang.dev/docs/advanced/deployment/cli#create-db) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
how can I host the blog from the saas template as a subdomain but separately still than the app? @kapa.ai
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To host the blog from the OpenSaaS template as a subdomain separately from the app, you can follow these steps: 1. Build the blog: Navigate to the blog/ directory in the OpenSaaS template and build the blog using the build command provided by Astro (the framework used for the blog). This will generate a set of static files that you can deploy. 2. Deploy the blog: Deploy the static files to a static hosting provider. The exact steps depend on your hosting provider. Some popular choices include Netlify, Vercel, and GitHub Pages. 3. Set up a subdomain: In your DNS provider, create a CNAME record that points your subdomain (e.g., blog.yourdomain.com) to the domain provided by your static hosting provider. Please note that the blog and the app are separate applications. The blog is a static site built with Astro, while the app is a full-stack application built with Wasp, React, and Prisma. They are deployed separately and can be hosted on different domains or subdomains. Here are the relevant knowledge sources: - OpenSaaS Blog Deployment (https://discord.com/channels/686873244791210014/1204929776272281641) - Deploying the Web Client (frontend) (https://wasp-lang.dev/docs/advanced/deployment/manually#3-deploying-the-web-client-frontend) - Astro Deployment Guide (https://docs.astro.build/guides/deploy) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
I would rather it be under https://cubsai.com/docs and https://cubsai.com/blog can I do that?
Cubs AI Apps
AI tools that will melt your faces
Cubs AI Apps
AI tools that will melt your faces
MEE6
MEE6ā€¢3mo ago
Wohooo @Cubs, you just became a Waspeteer level 2!
Cubs
Cubsā€¢3mo ago
I would rather it be under https://cubsai.com/docs and https://cubsai.com/blog can I do that? @kapa.ai
Cubs AI Apps
AI tools that will melt your faces
Cubs AI Apps
AI tools that will melt your faces
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- Yes, you can host your blog and docs under <https://cubsai.com/blog> and <https://cubsai.com/docs> respectively. This setup is often referred to as path-based routing. However, this setup might be more complex than subdomain-based routing because it requires a reverse proxy or a similar solution to route requests based on their paths to the correct applications. Here's a general idea of how you can do it: 1. Build the blog and docs: Navigate to the blog/ and docs/ directories in your project and build them using the build commands provided by their respective frameworks. This will generate sets of static files that you can deploy. 2. Deploy the blog and docs: Deploy the static files to a static hosting provider. The exact steps depend on your hosting provider. Some popular choices include Netlify, Vercel, and GitHub Pages. 3. Set up a reverse proxy: In your main server (the one serving <https://cubsai.com>), set up a reverse proxy that routes requests to <https://cubsai.com/blog> and <https://cubsai.com/docs> to the domains provided by your static hosting provider. The exact steps depend on your server software. Some popular choices include Nginx and Apache. Please note that the blog and docs are separate applications. They are deployed separately and can be hosted on different paths under the same domain. Here are the relevant knowledge sources: - OpenSaaS Blog Deployment (https://discord.com/channels/686873244791210014/1204929776272281641) - Deploying the Web Client (frontend) (https://wasp-lang.dev/docs/advanced/deployment/manually#3-deploying-the-web-client-frontend) - Astro Deployment Guide (https://docs.astro.build/guides/deploy) Please note that setting up a reverse proxy might require advanced knowledge of server administration. If you're not comfortable with this, you might want to consider using subdomains (like blog.cubsai.com and docs.cubsai.com) instead. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
@kapa.ai how can I deploy blog in saas template from cli using netlify and need to download that cli too and get account
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To deploy the blog from the OpenSaas template using Netlify, you'll first need to install the Netlify CLI and create a Netlify account. Here are the steps: 1. Install Netlify CLI: You can install the Netlify CLI globally on your machine using npm (Node.js package manager) with the following command:
npm install netlify-cli -g
npm install netlify-cli -g
2. Create a Netlify account: Go to Netlify (https://www.netlify.com/) and sign up for a new account. 3. Login to Netlify CLI: Use the following command to log in to your Netlify account:
netlify login
netlify login
4. Build the blog: Navigate to the blog/ directory in the OpenSaaS template and build the blog using the build command provided by Astro (the framework used for the blog). This will generate a set of static files that you can deploy. 5. Deploy the blog: While still in the blog/ directory, run the following command to deploy the blog to Netlify:
netlify deploy
netlify deploy
Follow the prompts to create a new site (or select an existing one), and specify the build directory (which should be the current directory if you're in the blog/ directory). 6. Deploy to production: After previewing your site, you can deploy it to production with the following command:
netlify deploy --prod
netlify deploy --prod
Your blog should now be live at a URL like <https://<app-name>.netlify.app.> Here are the relevant knowledge sources: - Netlify CLI Get Started Guide (https://docs.netlify.com/cli/get-started/) - Deploying Manually to Netlify (client) (https://wasp-lang.dev/docs/advanced/deployment/manually#netlify-client) - OpenSaaS Blog Deployment (https://discord.com/channels/686873244791210014/1204929776272281641) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
how do I set up DNS to point my subdomain from https://cubsai.com I have hosted on vercel? @kapa.ai so docs and blog work
Cubs AI Apps
AI tools that will melt your faces
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To set up DNS to point your subdomains (like docs.cubsai.com and blog.cubsai.com) to your site hosted on Vercel, you can follow these steps: 1. Add your domain to Vercel: In your Vercel dashboard, go to the Domains page and add your domain (cubsai.com). 2. Configure DNS records: In your DNS provider, create CNAME records that point your subdomains (docs and blog) to the domain provided by Vercel. The exact steps depend on your DNS provider. The CNAME records should look something like this:
docs CNAME alias.zeit.co.
blog CNAME alias.zeit.co.
docs CNAME alias.zeit.co.
blog CNAME alias.zeit.co.
3. Assign the subdomains in Vercel: In your Vercel dashboard, go to the settings of your project and assign the subdomains (docs.cubsai.com and blog.cubsai.com) to your project. Please note that DNS changes can take up to 48 hours to propagate. Here are the relevant knowledge sources: - Vercel Documentation: Adding a Domain (https://vercel.com/docs/custom-domains) - Vercel Documentation: Configuring DNS (https://vercel.com/docs/custom-domains#configuring-dns) - Vercel Documentation: Assigning a Domain to a Project (https://vercel.com/docs/custom-domains#assigning-a-domain-to-a-project) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
@kapa.ai walk me through what files in the template I change to point the blog and docs as mysite.com/docs and mysite.com/blog instead of subdomains. I have the blog hosted on netlify right now what do I do to get them in same website
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To host your blog and docs under <https://mysite.com/blog> and <https://mysite.com/docs> respectively, you would typically need to set up a reverse proxy to route requests based on their paths to the correct applications. However, this setup might be more complex than subdomain-based routing because it requires a reverse proxy or a similar solution to route requests based on their paths to the correct applications. Unfortunately, Netlify, which is a static site host, does not support this kind of setup out of the box. You would need a more complex setup involving a server that can route requests based on paths, such as an Express.js server on Node.js, or a serverless function setup on a platform like Vercel or AWS. If you want to keep using Netlify for hosting, a simpler solution would be to use subdomains for your blog and docs, like blog.mysite.com and docs.mysite.com. You can set this up in your DNS settings by creating CNAME records that point to your Netlify site. Here are the relevant knowledge sources: - OpenSaaS Blog Deployment (https://discord.com/channels/686873244791210014/1204929776272281641) - Deploying the Web Client (frontend) (https://wasp-lang.dev/docs/advanced/deployment/manually#3-deploying-the-web-client-frontend) - Astro Deployment Guide (https://docs.astro.build/guides/deploy) Please note that setting up a reverse proxy might require advanced knowledge of server administration. If you're not comfortable with this, you might want to consider using subdomains (like blog.mysite.com and docs.mysite.com) instead. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Cubs
Cubsā€¢3mo ago
@kapa.ai how do I save this repo the saas template to a new github repo, step by step walk me thru getting it on my github, the gitignore hides the env files already
kapa.ai
kapa.aiā€¢3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- To save the OpenSaaS template to a new GitHub repository, you can follow these steps: 1. Create a new repository on GitHub: Go to GitHub (https://github.com/) and create a new repository. You can leave the repository empty without any README, .gitignore, or license. 2. Clone the OpenSaaS template: On your local machine, clone the OpenSaaS template using Git. You can do this with the following command:
git clone <https://github.com/wasp-lang/open-saas.git>
git clone <https://github.com/wasp-lang/open-saas.git>
3. Navigate to the cloned directory: Use the cd command to navigate to the cloned directory:
cd open-saas
cd open-saas
4. Change the remote repository: By default, the remote repository of your local repository is the OpenSaaS template. You need to change it to your new GitHub repository. You can do this with the following command:
git remote set-url origin <https://github.com/your-username/your-repository.git>
git remote set-url origin <https://github.com/your-username/your-repository.git>
Replace <https://github.com/your-username/your-repository.git> with the URL of your new GitHub repository. 5. Push the code to your new repository: Now you can push the code to your new repository with the following command:
git push -u origin master
git push -u origin master
Your OpenSaaS template is now saved to your new GitHub repository. Here are the relevant knowledge sources: - GitHub: Creating a new repository (https://docs.github.com/en/get-started/quickstart/create-a-repo) - GitHub: Changing a remote's URL (https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories#changing-a-remotes-url) - GitHub: Pushing commits to a remote repository (https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Cubs, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
mihoā€¢3mo ago
Do you still need help? It's easier for us to jump in if you wait for us to pick up the initial question, but let us know if you are still stuck.
Cubs
Cubsā€¢3mo ago
Hey thanks for answering, the openAI bot helped me a lot, you got it well trained! I'm deployed and set up on github and getting closer to PROD V1 which is wild for not being a dev thx though I will let you know if I get stuck again
Want results from more Discord servers?
Add your server