Docker-less setup #130
Replies: 23 comments 10 replies
-
@olivierlambert Thanks for opening this issue 😃. Our stack is just Sveltekit and Supabase, the Sveltekit part is just like any frontend framework where you build and serve, that is straight forward. However for the Supabase part, I am not sure how people want to do that part. There are 2 options according to my level of understanding now:
For any of the 2 options, you still need to get these environment variables PUBLIC_SUPABASE_PROJECT_REF=<PROJECT REF>
PUBLIC_SUPABASE_URL=<API URL>
PUBLIC_SUPABASE_ANON_KEY=<anon key>
PUBLIC_SUPABASE_BUCKET_URL=<Inbucket URL> In addition, I need to write a script to apply changes in the repo to any supabase account. Which of the 2 options matches your requirement? |
Beta Was this translation helpful? Give feedback.
-
Hey @rotimi-best First, (and I forgot to say that in my initial message): thank you for this great software. Then, thank you for your very fast and detailed answer. You rock 👍 I have to admit I'm not used to Sveltekit and Supabase, so I probably need to learn a bit how it works and how I could build those. Anyway, I'm all in for the self hosted Supabase, because I'm trying to self-host everything at my company. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much @olivierlambert. I am super happy to help you on your self hosting journey. TBH I haven't selfhosted supabase before but I think the process should be well documented and smooth. Do you mind sharing your use-case for classroomio 😃? We can start taking baby steps to help you selfhost the whole stack, this is also gonna be helpful because we can document the selfhosting process in our documentation |
Beta Was this translation helpful? Give feedback.
-
Sure, the use case is pretty simple: we'd like to offer a training/certification program on our open source virtualization stack (see https://vates.tech for the details). We started to have some courses on slides, but having a solution to deliver the courses with a quiz and such will offer a nice experience. Obviously, this means we'll probably know to interconnect many software together (or to have an SSO for our existing customer portal to make them connect to all our apps seamlessly) but this is not the priority right now. So I'm exploring all the different Open Source LMS platforms, I don't need something super complicated, I'm not a university or something, it's few courses (probably 10 at max on the long run). |
Beta Was this translation helpful? Give feedback.
-
Oh this makes sense. This was my exact problem with the existing open source solutions. The stack was either complicated to setup and uses some stale technologies or the feature sets were more best suited for enterprises. Do you want to try out the platform first before investing the time in selfhosting? I can give you a quick demo or give you access to the platform to try out the cloud version yourself - whichever you prefer 😃 |
Beta Was this translation helpful? Give feedback.
-
Hmm why not, but usually I'm first installing it on prem and testing it. I'm crazy busy but if I can't attend the demo, someone else from my team could attend. I'll discuss this internally and book a demo via your cal link. |
Beta Was this translation helpful? Give feedback.
-
Sounds good. That's fine. Whichever is fine by you. Please feel free to continue the convo here or just shoot me an email [email protected] |
Beta Was this translation helpful? Give feedback.
-
Thanks, we'll focus on the tech part in here, and have a convo in parallel with the relevant people at Vates. Thank you again for your great software and also your time to answer! |
Beta Was this translation helpful? Give feedback.
-
So I'm back and now starting to actively try to install the stack locally, without Docker :) If I understand correctly, the app I want to use is the "dashboard" one. I need to build that app and then to connect it to Supabase (it's another topic for now). However, if I go in the dashboard folder and try to do
I'm using Node 18. |
Beta Was this translation helpful? Give feedback.
-
Welcome back 😀. Not sure if I need to improve the communication in the README however to install the packages we use pnpm. That means you should run |
Beta Was this translation helpful? Give feedback.
-
So… progress! \o/ Now I'm in front of this: |
Beta Was this translation helpful? Give feedback.
-
So in short, I'm loading Nginx in front of |
Beta Was this translation helpful? Give feedback.
-
Okay so it's a bit better with If not, trying to register fails with: |
Beta Was this translation helpful? Give feedback.
-
Oh, glad it worked. Yeah @cannarron is actually working on a contributibution that adds dummy data into the db after running migrations. This gives you test users and courses to start interacting with. You can't register (NetworkError when attempting to fetch resource) because you don't have the database layer up and running. Can you follow the guide in the README to setup supabase locally and you can add that to your environment variables. With this, registration should go smoothly. |
Beta Was this translation helpful? Give feedback.
-
I did install/deploy supabase (on another machine where I can run Docker), so it's running and I can reach it. But maybe you have a script somewhere on your own doing something I didn't? edit: ah, I need to open some ports in the firewall. |
Beta Was this translation helpful? Give feedback.
-
So I'm not sure exactly about the configuration between Supabase and Dashboard app. I followed the Supabase self-hosted guide and configured to listen on an IP that can be reach now from the VM running ClassroomIO. But it's a bit confusing about which service/port I should use. For example, on Classroom, I have:
edit: or are you accessing everything via Kong? Then it would be |
Beta Was this translation helpful? Give feedback.
-
Ah I think I start to understand the issue. Dashboard app is behind an HTTPS frontend (Nginx doing SSL termination) and Supabase is on HTTP. Mixed content is blocked by the browser. However in HTTPS, I only have self signed certificates for Superbase, and it seems to block the request from Dashboard app. I wonder if it's possible to tell Dashboard app to ignore self-signed certs. |
Beta Was this translation helpful? Give feedback.
-
Hi @olivierlambert, will try to answer all your questions. Supabase environment variables
|
Beta Was this translation helpful? Give feedback.
-
@olivierlambert I am not sure tbh. I haven't worked with self signed certificates. It seems to me that HTTPS/HTTP issue is a browser constraint and not one that can be controlled from a web app |
Beta Was this translation helpful? Give feedback.
-
Okay so I disabled mixed content protection in the browser for now, at least I can move forward (I'll see later on how to fix this, but it's important to understand it's harder to self-host when your components aren't placed on the same machine). Anyway, now I have a different problem (visible in the dev console):
What's also weird, is that I don't have any existing project in Supabase. Should I create one manually? Did I miss anything in there? |
Beta Was this translation helpful? Give feedback.
-
I think I will abandon the self-hosted route for now: it's far far from being usable in a reasonable amount of time:
I will switch to the Cloud version even if I wanted to avoid it in the first place, but it's too young to be ready to do it. I understand how convenient tools like Supabase can be to develop fast, but they are a real pain in the ass to deal with when you need to self-host. I suppose you might need extra feature vs a regular Postgres database, but there is consequences on the "usability" for the average sysadmin. |
Beta Was this translation helpful? Give feedback.
-
@olivierlambert Thanks for your patience, I just completed the video tutorial showing how to setup your supabase project in their cloud offering and just connect to our self hosted (or local) frontend. Here is the video: https://www.youtube.com/watch?v=dAZAZ0oiky0 I am also working on adding this to our documentation. However in order not to delay getting it to you, I decided to share the video with you first and once I am done with the docs (practically the same thing in the video), I will also share it with you as well. btw how is your course creation coming along 😀? |
Beta Was this translation helpful? Give feedback.
-
@olivierlambert In addition to the video, I have written a documentation on how to setup a Supabase Cloud Project and link with our application. With this approach, you can selfhost our frontend application, and use supabase cloud to manage all the data and the backend which you will have full control over. https://www.classroomio.com/docs/contributor-guides/supabase-cloud |
Beta Was this translation helpful? Give feedback.
-
Improvement Description
Sometimes, you might want to use the software in a regular VM (or small host, like a Raspberry Pi) without relying on Docker, especially outside a purely dev oriented environment.
Rationale
From my personal point of view, I'm not using Docker nor want to manage containers in production. Doing a git pull and npm build is often enough to start in production mode and serve all of it via a reverse proxy (eg Nginx+LE). This also help to contain the dependency creep by knowing exactly the services you need and self-host them the way you want.
Proposed Solution
Nothing specific is required outside to document how to achieve it in the official doc or README file. I'm open to participate in that direction if it's OK for the project :)
Alternatives (optional)
No response
Additional Context
No response
Please check the boxes that apply to this improvement suggestion.
Beta Was this translation helpful? Give feedback.
All reactions