feat: Finally support a docker compose files that works (#555)

This commit is contained in:
Rotimi Best
2025-05-20 01:37:58 +01:00
committed by GitHub
parent 512fe06722
commit 9aeefc9f4f
15 changed files with 215 additions and 605 deletions
@@ -1,13 +1,3 @@
import Image from 'next/image';
import { Steps } from 'nextra/components';
import { Callout } from 'nextra/components';
import DBUrl from './images/db-url.webp';
import DBPushResult from './images/db-push-result.webp';
import AuthSettings from './images/auth-settings.webp';
import MatchEnvVariables from './images/match-env.webp';
import NewProject from './images/new-project.webp';
import SmtpSettings from './images/smtp-settings.webp';
# Supabase Cloud Setup
In this guide, you will learn how to setup a supabase cloud project and link it to your local environment.
@@ -58,7 +48,7 @@ Once you have an account just click on the _New Project_ on your dashboard. Afte
Open your terminal and go to the root of the project. Run the following:
```bash copy
pnpm supabase login
pnpm supabase:login
```
Follow the instruction in your terminal to generate your access token. Paste the token in the console and hit **Enter**
@@ -75,7 +65,7 @@ Follow the instruction in your terminal to generate your access token. Paste the
- Then run in your terminal:
```bash copy
pnpm supabase db push --db-url "URL HERE"
pnpx supabase@1.51.1 db push --db-url "URL HERE"
```
<Callout>
+46 -6
View File
@@ -1,7 +1,3 @@
import { Callout } from 'nextra/components';
import Image from 'next/image';
import SelfhostClassroomIO from './images/selfhost-classroomio.webp';
# Self-hosting ClassroomIO.com
This guide will help you quickly selfhost ClassroomIO
@@ -119,6 +115,50 @@ PRIVATE_APP_SUBDOMAINS=""
## Using Docker
We do have a [docker-compose file](https://github.com/rotimi-best/classroomio/blob/main/docker-compose.yaml) to deploy both the backend and dashboard however it still requires some more debugging and we are still trying to figure out how we can also get supabase to be included in the docker compose file.
We provide a docker-compose configuration to deploy both the backend and dashboard services. Here's how to use it:
If you'd like to help with this, please do open a PR on Github 👍🏽
1. Clone the repository:
```bash
git clone https://github.com/rotimi-best/classroomio.git
cd classroomio
```
2. Create a `.env` file with your environment variables (see Environment Variables section above)
3. Start the services:
```bash
docker compose up --build
```
The services will be available at:
- Dashboard: http://localhost:3000
- Backend: http://localhost:3002
### Service Configuration
The docker-compose file sets up two services:
#### Backend Service
- Runs on port 3002
- Uses Node.js slim image
- Mounts the backend code directory
- Requires environment variables for:
- Supabase configuration
- Cloudflare R2 for video uploads
- SMTP for email notifications
#### Dashboard Service
- Runs on port 3000
- Uses Node.js Alpine image
- Uses pnpm for package management
- Requires environment variables for:
- Supabase configuration
- Application settings
- Optional API keys (OpenAI, Unsplash)
Note: We're currently working on including Supabase in the docker-compose file. If you'd like to help with this, please open a PR on GitHub! 👍