Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HowTo: Host on other providers than Vercel #7

Open
Shackless opened this issue Mar 23, 2023 · 2 comments
Open

HowTo: Host on other providers than Vercel #7

Shackless opened this issue Mar 23, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation self-hosting

Comments

@Shackless
Copy link
Contributor

Shackless commented Mar 23, 2023

SlickGPT is setup to use Vercel as hosting provider. It uses @sveltejs/adapter-vercel and configures the endpoints in the /api dir to run as Edge functions. Create some documentation and/or branches to show how to run it on:

  • Netlify
  • Azure
  • ?

I already tried with Netlify and encountered an unexpected issue where Netlify was not able to access env vars from $env/static/private. See this issue for more infos and a workaround. Another problem was that longer prompts timed out because the edge/serverless functions ran too long on Netlify.

@Shackless Shackless added the documentation Improvements or additions to documentation label Mar 23, 2023
@Shackless
Copy link
Contributor Author

Shackless commented Mar 28, 2023

@theRealBithive It's a standard SvelteKit site, so it already is easily self-hostable. Do you have a Node server? Use @sveltejs/adapter-node and run it. You can remove all the "third parties" (Firebase) by disabling or rewriting the Share feature (see README and #6) in like 10 minutes time because for that to work you actually need a database of some kind.

This issue is just a reminder to add some documentation or forks/branches/templates to show people how to do it in case they don't know.

@withLinda
Copy link

In case someone wants to deploy using Railway app,

To successfully deploy the project using Railway app, I followed these steps:

  1. Since I didn't have access to a Firebase API, I used dummy data in the .env file. This only impacts the functionality of the share button, which won't work. However, all other functions, including chat, will work without any issues.

  2. I made the following updates in the package.json file:

  • Added a start script: "start": "node build"

  • Included the devDependencies for "@sveltejs/adapter-node": "^1.3.1",

  1. Here is the Nixpacks setup I used:

╔═════════ Nixpacks v1.13.0 ════════╗

║ setup │ nodejs-16_x, npm-9_x

║ install │ npm i

║ build │ npm run build

║ start │ npm run start

╚════════════════════════════╝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation self-hosting
Projects
None yet
Development

No branches or pull requests

2 participants