Skip to content

Instantly share code, notes, and snippets.

View rotimi-best's full-sized avatar
👨‍💻
Inventing the future

Rotimi Best rotimi-best

👨‍💻
Inventing the future
View GitHub Profile

Packaging Supabase with Docker Compose

Created: 07/08/2025, 20:18:00 Last Updated: 07/08/2025, 20:28:56

User

If you look at the README of my project, we use supabase https://github.com/classroomio/classroomio/files/README.md for our database however when we want to package our software it's hard to package supabase because it has its own docker compose file and several steps to selfhosting.

Here is our docker compose file https://github.com/classroomio/classroomio/files/docker-compose.yaml

@rotimi-best
rotimi-best / DockerfileForSvelteKit.md
Created September 18, 2024 15:31 — forked from aradalvand/DockerfileForSvelteKit.md
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
@rotimi-best
rotimi-best / sql
Last active June 7, 2024 17:39
get_explore_courses.sql
drop function if exists public.get_explore_courses (uuid, uuid);
create
or replace function public.get_explore_courses (org_id_arg uuid, profile_id_arg uuid) returns table (
id uuid,
org_id uuid,
title character varying,
slug character varying,
description character varying,
@rotimi-best
rotimi-best / load_setup.ts
Created April 2, 2024 11:32
Load function for TS file of /setup page
import get from 'lodash/get';
async function getGenericData(orgSlug: string): Promise<{ isCoursePublished: boolean; isCourseCreated: boolean; orgHasAvatarUrl: boolean}> {
const { data } = await supabase.from('course').select(`
id,
is_published,
group:group_id!inner(
organization!inner (
avatar_url,
siteName
@rotimi-best
rotimi-best / create_service_cache.sh
Last active October 31, 2023 07:45
Script that generates a cache.ts file for any service
#!/bin/bash
# Service name for the TypeScript file.
service_name="$1"
file_name="cache.ts"
# Code content to write to the file.
code="import { revalidateTag } from \"next/cache\";
interface RevalidateProps {
@rotimi-best
rotimi-best / .svelte
Created October 20, 2023 16:36
Horizontal Scroll of Students
<script>
let name = 'world';
const students = [
{ avatarUrl: 'https://images.unsplash.com/photo-1599566150163-29194dcaad36?auto=format&fit=crop&q=60&w=800&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8YXZhdGFyc3xlbnwwfHwwfHx8Mg%3D%3D', name: 'Ifeanyi' },
{ avatarUrl: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?auto=format&fit=crop&q=60&w=800&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8OHx8YXZhdGFyc3xlbnwwfHwwfHx8Mg%3D%3D', name: 'John' },
{ avatarUrl: '', name: 'Tunji' },
{ avatarUrl: '', name: 'Trump' },
{ avatarUrl: '', name: 'Buhari' },
]
@rotimi-best
rotimi-best / git.md
Created September 30, 2021 09:34
How we work using Git

Git commands

0. Создание / клонирование / добавление репозитория

Клонирование ропозитория:

hg clone https://[email protected]/someRepo/projectName

Инициализация локального репозитория:

@rotimi-best
rotimi-best / index.html
Created June 2, 2021 13:29
Questionnaire Builder
<div id="root"></div>
@rotimi-best
rotimi-best / react-folder-structure.md
Last active April 8, 2021 02:18
An opinionated folder structure for my react applications
root/
├── __test__/
├── public/
├── .storybook/
│   ├──stories/
│   │   ├── NextButton/
│   │   │   └── NextButton.stories.js
│   │   └── RadioButton/
@rotimi-best
rotimi-best / fetch.js
Created December 21, 2020 16:59
Basic fetch request
fetch('https://httpbin.org/post', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({a: 1, b: 'Textual content'})
});