From a3faa387f245c2ffbdacdfc1625fcc285f6c3bcb Mon Sep 17 00:00:00 2001 From: MB <675944+MBybee@users.noreply.github.com> Date: Thu, 19 Feb 2026 14:24:36 -0700 Subject: [PATCH 1/4] Tweaked to allow multiple parallel instances Adjusted the .env and docker compose files to allow for customization to make it easy to run multiple parallel instances with different project names, orgs, settings, and dbs. Added a .env_1 to show an example of this customization. This was tested a fair bit (currently in use with a 3 system landscape on one docker host right now). No changes should be required to the docker compose, just clone off multiple copies of the repo directory, adjust the .env file details, and run "docker compose up -d" to deploy, or "docker compose down -v" to destroy. --- .env | 65 +++++++++++++++++++++------ .env_1 | 65 +++++++++++++++++++++++++++ docker-compose.yml | 108 ++++++++++++++++++++++++++++++++------------- 3 files changed, 193 insertions(+), 45 deletions(-) create mode 100644 .env_1 diff --git a/.env b/.env index e3734f4..07cabeb 100644 --- a/.env +++ b/.env @@ -4,25 +4,62 @@ # Generate using `docker run ghcr.io/webysther/supabase-keys` -ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzcxMDAwMjgzLCJleHAiOjIwODYzNjAyODN9.mtJaR2o4-cBpCo_0pF__nVpqD1iT7y5557F9CtS_3RU -SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3NzEwMDAyODMsImV4cCI6MjA4NjM2MDI4M30.2SCg5W_b4jvn-rym961kspZagC5BSKjsZT5al1COh6M +ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzcxNTM0MTQ3LCJleHAiOjIwODY4OTQxNDd9.L_7o01hrUk73PcHRQX02NQy8ZszAh36MAtf2SYWssdY +SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3NzE1MzQxNDcsImV4cCI6MjA4Njg5NDE0N30.GtWTvHCz691TAMy37m5fG6nkKq_jaZen5rj_bVs73Lo -JWT_SECRET=euixM7UpnUA48/BPwqp7mCg5AzgBkkrm4FXduSUE -SECRET_KEY_BASE=vSxOTcRTqg7/tmtn51+FGFOhlkW6XRYhEozsDBcoDW8CNc6H1bC6eyukJDuzw8Bp -VAULT_ENC_KEY=17153ded3dcbc727cd2fbb9180f3ac9a -PG_META_CRYPTO_KEY=vO51vHfoTnGb0xL8vdTX//rAeLUsOHJw -LOGFLARE_PUBLIC_ACCESS_TOKEN=HkK78QwdCtpLO7ldPwLdWkvnqf8Qcj7k -LOGFLARE_PRIVATE_ACCESS_TOKEN=lxPrQkgVNhrlck9YhzPQVT76j3w5mO9G -POOLER_TENANT_ID=21ac4b029a945e22 -DB_ENC_KEY=1495a59cdefff427 +JWT_SECRET=j0vxzHPBtctXdNkQR+ZRe7zCvFG7V2R74WfINt1p +SECRET_KEY_BASE=2dDvMlHpcnGdqsqNbEOclCzkTwclx34XKlmHAwU7Izj9pIXWGMqAO3otwnuOlyxF +VAULT_ENC_KEY=dbee6acc5acb2e31dcb95ec1dcf627fd +PG_META_CRYPTO_KEY=tzg3zIngubnipK9VU5fwnRXffAArMYdL +LOGFLARE_PUBLIC_ACCESS_TOKEN=9HpnKIqiv8mZnX/71xKKtXJ7DXmSwpbd +LOGFLARE_PRIVATE_ACCESS_TOKEN=mU/g9kPr1AVSUAKl/ANtq7QVz7d0LRzL +POOLER_TENANT_ID=e8042f1016af8c4e +DB_ENC_KEY=7147db598493d6ef -POSTGRES_PASSWORD=4453c7e730defb0251c714904e9ca0a9 -DASHBOARD_PASSWORD=ea26be7c79c293564adb35944d230bdc +POSTGRES_PASSWORD=f4967acab1d06aff597583537c4d75a3 +DASHBOARD_PASSWORD=659cccd0a9be48f724a6246ea13a0e11 + + + +############ +# Parallel docker config follows +############ ############ -# Database +# DB and Service ports need to be unique ############ +EXT_POSTGRES_PORT=5432 +EXT_POOLER_PORT=6543 +EXT_KONG_HTTP_PORT=8000 +############ +# Project Info - no spaces. +# This seperates the containers/volumes/networks +# Project name MUST be unique +############ + +PROJECT_NAME=Parallel_Project +DASHBOARD_USERNAME=supabase + +############ +# Project and Org Info - spaces are ok +############ +STUDIO_DEFAULT_ORGANIZATION=Your Organization +STUDIO_DEFAULT_PROJECT=Default Project + +############ +# DB Info - should be stable +############ POSTGRES_HOST=db POSTGRES_DB=postgres -POSTGRES_PORT=5432 \ No newline at end of file +#POSTGRES_IMAGE=pgvector/pgvector:pg17 +POSTGRES_IMAGE=ghcr.io/webysther/supabase-postgres:15.8.1 + +############ +# Internal Connection Settings (always standard ports) +############ +POSTGRES_HOST=db +POSTGRES_PORT=5432 +POOLER_PORT=6543 +KONG_HTTP_PORT=8000 + diff --git a/.env_1 b/.env_1 new file mode 100644 index 0000000..a11e600 --- /dev/null +++ b/.env_1 @@ -0,0 +1,65 @@ +############ +# Secrets +############ + +# Generate using `docker run ghcr.io/webysther/supabase-keys` + +ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzcxNTM0MjIwLCJleHAiOjIwODY4OTQyMjB9.neZv8FlGAOLRT7qMw5q2xNSMIbjQYw7SOfp-kxSROkI +SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3NzE1MzQyMjAsImV4cCI6MjA4Njg5NDIyMH0.oQe2gDDnkkUKT7lpvQ-yot1A1ovgHK23cgX08W-C8j8 + +JWT_SECRET=N5omM9R56uNNpCqSdMqJNXdP9I+mrkEUVltXfeYD +SECRET_KEY_BASE=dEUfbm6cf4Y5wjti40YseTOmHiKgsKnj1Huv5Dix63yh+gHJ/UsoUdtM3AOx9hGk +VAULT_ENC_KEY=99881ab2ee6fd6b117c6515d02624707 +PG_META_CRYPTO_KEY=//zOggTLvpboywx9EJWfcinlIZqap7AF +LOGFLARE_PUBLIC_ACCESS_TOKEN=OL4nmMrv8wxPK/hkbjxI9Z8pXbbCfid3 +LOGFLARE_PRIVATE_ACCESS_TOKEN=GLL0WlbjsPUd4T8qJ+qk/67vX4A0liMO +POOLER_TENANT_ID=5f67c0171f990b4a +DB_ENC_KEY=da05662fef3735c8 + +POSTGRES_PASSWORD=93ffce1752c16350e89827de6abec9de +DASHBOARD_PASSWORD=cdfd135122a44509e82e9ad856769176 + + + +############ +# Parallel docker config follows - this version of the file would be .env for a second supabase in a new directory +############ + +############ +# DB and Service ports need to be unique +############ +EXT_POSTGRES_PORT=5433 +EXT_POOLER_PORT=6544 +EXT_KONG_HTTP_PORT=8001 + +############ +# Project Info - no spaces. +# This seperates the containers/volumes/networks +# Project name MUST be unique +############ + +PROJECT_NAME=Parallel_Project_1 +DASHBOARD_USERNAME=supabase + +############ +# Project and Org Info - spaces are ok +############ +STUDIO_DEFAULT_ORGANIZATION=Your Organization +STUDIO_DEFAULT_PROJECT=Default Project 2 + +############ +# DB Info - should be stable +############ +POSTGRES_HOST=db +POSTGRES_DB=postgres +#POSTGRES_IMAGE=pgvector/pgvector:pg17 +POSTGRES_IMAGE=ghcr.io/webysther/supabase-postgres:15.8.1 + +############ +# Internal Connection Settings (always standard ports) +############ +POSTGRES_HOST=db +POSTGRES_PORT=5432 +POOLER_PORT=6543 +KONG_HTTP_PORT=8000 + diff --git a/docker-compose.yml b/docker-compose.yml index 94e26fd..d840a32 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,34 +1,55 @@ -name: supabase +# Variables set to use EXT prefix for all external facing ports (to avoid collions) +# The variables without EXT prefix are internal or global (passwords, etc) +# Defaults are provided for some parameters, but mostly they come from .env. +# DB image is provided from .env, just in case you wish to use the pg17 or custom +# Ideally you don't need to edit this file at all + +# Project name is parameterized to allow multiple instances running in parallel +name: ${PROJECT_NAME} x-common: &common - networks: [ supabase-internal ] + # Network names parameterized + networks: + - internal env_file: .env restart: unless-stopped + services: studio: <<: *common image: ghcr.io/webysther/supabase-studio:2026.01.27 - container_name: supabase-studio + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-studio + # Studio display settings - parameterized for multi-instance clarity + environment: + STUDIO_DEFAULT_ORGANIZATION: ${STUDIO_DEFAULT_ORGANIZATION:-Default Organization} + STUDIO_DEFAULT_PROJECT: ${STUDIO_DEFAULT_PROJECT:-Default Project} depends_on: analytics: condition: service_healthy volumes: + # Volume references use static keys - snippets:/app/snippets - functions:/app/edge-functions kong: <<: *common image: ghcr.io/webysther/supabase-kong:2.8.1 - container_name: supabase-kong + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-kong + environment: + DASHBOARD_USERNAME: ${DASHBOARD_USERNAME} ulimits: nofile: soft: 4096 hard: 4096 networks: - - supabase - - supabase-internal + # Network references use static keys + - default + - internal ports: - - 8000:8000/tcp + # External port parameterized - internal port stays 8000 + - ${EXT_KONG_HTTP_PORT:-8000}:8000/tcp depends_on: analytics: condition: service_healthy @@ -36,7 +57,8 @@ services: auth: <<: *common image: ghcr.io/webysther/supabase-auth:2.185.0 - container_name: supabase-auth + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-auth depends_on: db: condition: service_healthy @@ -46,7 +68,8 @@ services: rest: <<: *common image: ghcr.io/webysther/supabase-rest:14.3 - container_name: supabase-rest + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-rest depends_on: db: condition: service_healthy @@ -56,7 +79,8 @@ services: realtime: <<: *common image: ghcr.io/webysther/supabase-realtime:2.72.0 - container_name: realtime-dev.supabase-realtime + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-realtime ulimits: nofile: soft: 10000 @@ -70,8 +94,10 @@ services: storage: <<: *common image: ghcr.io/webysther/supabase-storage:1.37.1 - container_name: supabase-storage + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-storage volumes: + # Volume reference uses static key - storage:/var/lib/storage depends_on: db: @@ -84,14 +110,17 @@ services: imgproxy: <<: *common image: ghcr.io/webysther/supabase-img:3.30.1 - container_name: supabase-imgproxy + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-imgproxy volumes: + # Volume reference uses static key - storage:/var/lib/storage meta: <<: *common image: ghcr.io/webysther/supabase-meta:0.95.2 - container_name: supabase-meta + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-meta depends_on: db: condition: service_healthy @@ -101,8 +130,10 @@ services: functions: <<: *common image: ghcr.io/webysther/supabase-functions:1.70.0 - container_name: supabase-edge-functions + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-edge-functions volumes: + # Volume reference uses static key - functions:/home/deno/functions depends_on: analytics: @@ -111,18 +142,27 @@ services: analytics: <<: *common image: ghcr.io/webysther/supabase-analytics:1.30.3 - container_name: supabase-analytics + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-analytics #ports: - # - 4000:4000 + # Optional analytics port - uncomment and parameterize if needed + # - ${EXT_ANALYTICS_PORT}:4000 depends_on: db: condition: service_healthy db: <<: *common - image: ghcr.io/webysther/supabase-postgres:15.8.1 - container_name: supabase-db + # DB image is parameterized to allow you to use other images + image: ${POSTGRES_IMAGE} + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME}-db + environment: + # Database settings - internal port is always 5432 + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB:-postgres} volumes: + # Volume references use static keys - db:/var/lib/postgresql/data - db-config:/etc/postgresql-custom depends_on: @@ -132,7 +172,8 @@ services: vector: <<: *common image: ghcr.io/webysther/supabase-vector:0.28.1 - container_name: supabase-vector + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME:-supabase}-vector volumes: - /var/run/docker.sock:/var/run/docker.sock:ro security_opt: @@ -141,10 +182,12 @@ services: supavisor: <<: *common image: ghcr.io/webysther/supabase-supavisor:2.7.4 - container_name: supabase-pooler + # Container name parameterized to avoid collision + container_name: ${PROJECT_NAME:-supabase}-pooler ports: - - ${POSTGRES_PORT}:5432 - - 6543:6543 + # External ports parameterized - internal ports stay 5432/6543 + - ${EXT_POSTGRES_PORT:-5432}:5432 + - ${EXT_POOLER_PORT:-6543}:6543 depends_on: db: condition: service_healthy @@ -152,19 +195,22 @@ services: condition: service_healthy volumes: + # Static keys with parameterized names to avoid collision db: - name: db + name: ${PROJECT_NAME:-supabase}-db db-config: - name: db-config + name: ${PROJECT_NAME:-supabase}-db-config functions: - name: functions + name: ${PROJECT_NAME:-supabase}-functions snippets: - name: snippets + name: ${PROJECT_NAME:-supabase}-snippets storage: - name: storage + name: ${PROJECT_NAME:-supabase}-storage networks: - supabase: - name: supabase - supabase-internal: - name: supabase-internal \ No newline at end of file + # Static keys with parameterized names to avoid collision + default: + name: ${PROJECT_NAME:-supabase} + internal: + name: ${PROJECT_NAME:-supabase}-internal + From b3c4f12147f3519d12972597ba4e36640a408512 Mon Sep 17 00:00:00 2001 From: MB <675944+MBybee@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:33:35 -0700 Subject: [PATCH 2/4] Tidying up the docker compose a bit more Decided to have a few less defaults, they're just a bit messy and it felt a little inconsistent. --- docker-compose.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d840a32..a4b37dd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -173,7 +173,7 @@ services: <<: *common image: ghcr.io/webysther/supabase-vector:0.28.1 # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME:-supabase}-vector + container_name: ${PROJECT_NAME}-vector volumes: - /var/run/docker.sock:/var/run/docker.sock:ro security_opt: @@ -183,7 +183,7 @@ services: <<: *common image: ghcr.io/webysther/supabase-supavisor:2.7.4 # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME:-supabase}-pooler + container_name: ${PROJECT_NAME}-pooler ports: # External ports parameterized - internal ports stay 5432/6543 - ${EXT_POSTGRES_PORT:-5432}:5432 @@ -197,20 +197,20 @@ services: volumes: # Static keys with parameterized names to avoid collision db: - name: ${PROJECT_NAME:-supabase}-db + name: ${PROJECT_NAME}-db db-config: - name: ${PROJECT_NAME:-supabase}-db-config + name: ${PROJECT_NAME}-db-config functions: - name: ${PROJECT_NAME:-supabase}-functions + name: ${PROJECT_NAME}-functions snippets: - name: ${PROJECT_NAME:-supabase}-snippets + name: ${PROJECT_NAME}-snippets storage: - name: ${PROJECT_NAME:-supabase}-storage + name: ${PROJECT_NAME}-storage networks: # Static keys with parameterized names to avoid collision default: - name: ${PROJECT_NAME:-supabase} + name: ${PROJECT_NAME} internal: - name: ${PROJECT_NAME:-supabase}-internal + name: ${PROJECT_NAME}-internal From f89dfc239d83ebc925a23225b639cf868da07ed8 Mon Sep 17 00:00:00 2001 From: MB <675944+MBybee@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:53:37 -0700 Subject: [PATCH 3/4] Updating project name Switching from ${PROJECT_NAME} to ${COMPOSE_PROJECT_NAME} --- .env | 130 +++++++------- .parallel_env | 65 +++++++ docker-compose.yml | 432 ++++++++++++++++++++++----------------------- 3 files changed, 346 insertions(+), 281 deletions(-) create mode 100644 .parallel_env diff --git a/.env b/.env index 07cabeb..e18c764 100644 --- a/.env +++ b/.env @@ -1,65 +1,65 @@ -############ -# Secrets -############ - -# Generate using `docker run ghcr.io/webysther/supabase-keys` - -ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzcxNTM0MTQ3LCJleHAiOjIwODY4OTQxNDd9.L_7o01hrUk73PcHRQX02NQy8ZszAh36MAtf2SYWssdY -SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3NzE1MzQxNDcsImV4cCI6MjA4Njg5NDE0N30.GtWTvHCz691TAMy37m5fG6nkKq_jaZen5rj_bVs73Lo - -JWT_SECRET=j0vxzHPBtctXdNkQR+ZRe7zCvFG7V2R74WfINt1p -SECRET_KEY_BASE=2dDvMlHpcnGdqsqNbEOclCzkTwclx34XKlmHAwU7Izj9pIXWGMqAO3otwnuOlyxF -VAULT_ENC_KEY=dbee6acc5acb2e31dcb95ec1dcf627fd -PG_META_CRYPTO_KEY=tzg3zIngubnipK9VU5fwnRXffAArMYdL -LOGFLARE_PUBLIC_ACCESS_TOKEN=9HpnKIqiv8mZnX/71xKKtXJ7DXmSwpbd -LOGFLARE_PRIVATE_ACCESS_TOKEN=mU/g9kPr1AVSUAKl/ANtq7QVz7d0LRzL -POOLER_TENANT_ID=e8042f1016af8c4e -DB_ENC_KEY=7147db598493d6ef - -POSTGRES_PASSWORD=f4967acab1d06aff597583537c4d75a3 -DASHBOARD_PASSWORD=659cccd0a9be48f724a6246ea13a0e11 - - - -############ -# Parallel docker config follows -############ - -############ -# DB and Service ports need to be unique -############ -EXT_POSTGRES_PORT=5432 -EXT_POOLER_PORT=6543 -EXT_KONG_HTTP_PORT=8000 - -############ -# Project Info - no spaces. -# This seperates the containers/volumes/networks -# Project name MUST be unique -############ - -PROJECT_NAME=Parallel_Project -DASHBOARD_USERNAME=supabase - -############ -# Project and Org Info - spaces are ok -############ -STUDIO_DEFAULT_ORGANIZATION=Your Organization -STUDIO_DEFAULT_PROJECT=Default Project - -############ -# DB Info - should be stable -############ -POSTGRES_HOST=db -POSTGRES_DB=postgres -#POSTGRES_IMAGE=pgvector/pgvector:pg17 -POSTGRES_IMAGE=ghcr.io/webysther/supabase-postgres:15.8.1 - -############ -# Internal Connection Settings (always standard ports) -############ -POSTGRES_HOST=db -POSTGRES_PORT=5432 -POOLER_PORT=6543 -KONG_HTTP_PORT=8000 - +############ +# Secrets +############ + +# Generate using `docker run ghcr.io/webysther/supabase-keys` + +ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzcxNTM0MTQ3LCJleHAiOjIwODY4OTQxNDd9.L_7o01hrUk73PcHRQX02NQy8ZszAh36MAtf2SYWssdY +SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3NzE1MzQxNDcsImV4cCI6MjA4Njg5NDE0N30.GtWTvHCz691TAMy37m5fG6nkKq_jaZen5rj_bVs73Lo + +JWT_SECRET=j0vxzHPBtctXdNkQR+ZRe7zCvFG7V2R74WfINt1p +SECRET_KEY_BASE=2dDvMlHpcnGdqsqNbEOclCzkTwclx34XKlmHAwU7Izj9pIXWGMqAO3otwnuOlyxF +VAULT_ENC_KEY=dbee6acc5acb2e31dcb95ec1dcf627fd +PG_META_CRYPTO_KEY=tzg3zIngubnipK9VU5fwnRXffAArMYdL +LOGFLARE_PUBLIC_ACCESS_TOKEN=9HpnKIqiv8mZnX/71xKKtXJ7DXmSwpbd +LOGFLARE_PRIVATE_ACCESS_TOKEN=mU/g9kPr1AVSUAKl/ANtq7QVz7d0LRzL +POOLER_TENANT_ID=e8042f1016af8c4e +DB_ENC_KEY=7147db598493d6ef + +POSTGRES_PASSWORD=f4967acab1d06aff597583537c4d75a3 +DASHBOARD_PASSWORD=659cccd0a9be48f724a6246ea13a0e11 + + + +############ +# Parallel docker config follows +############ + +############ +# DB and Service ports need to be unique +############ +EXT_POSTGRES_PORT=5432 +EXT_POOLER_PORT=6543 +EXT_KONG_HTTP_PORT=8000 + +############ +# Project Info - no spaces. +# This seperates the containers/volumes/networks +# Project name MUST be unique +############ + +COMPOSE_PROJECT_NAME=parallel_project +DASHBOARD_USERNAME=supabase + +############ +# Project and Org Info - spaces are ok +############ +STUDIO_DEFAULT_ORGANIZATION=Your Organization +STUDIO_DEFAULT_PROJECT=Default Project + +############ +# DB Info - should be stable +############ +POSTGRES_HOST=db +POSTGRES_DB=postgres +#POSTGRES_IMAGE=pgvector/pgvector:pg17 +POSTGRES_IMAGE=ghcr.io/webysther/supabase-postgres:15.8.1 + +############ +# Internal Connection Settings (always standard ports) +############ +POSTGRES_HOST=db +POSTGRES_PORT=5432 +POOLER_PORT=6543 +KONG_HTTP_PORT=8000 + diff --git a/.parallel_env b/.parallel_env new file mode 100644 index 0000000..dc6b0d1 --- /dev/null +++ b/.parallel_env @@ -0,0 +1,65 @@ +############ +# Secrets +############ + +# Generate using `docker run ghcr.io/webysther/supabase-keys` + +ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzcxNTM0MjIwLCJleHAiOjIwODY4OTQyMjB9.neZv8FlGAOLRT7qMw5q2xNSMIbjQYw7SOfp-kxSROkI +SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3NzE1MzQyMjAsImV4cCI6MjA4Njg5NDIyMH0.oQe2gDDnkkUKT7lpvQ-yot1A1ovgHK23cgX08W-C8j8 + +JWT_SECRET=N5omM9R56uNNpCqSdMqJNXdP9I+mrkEUVltXfeYD +SECRET_KEY_BASE=dEUfbm6cf4Y5wjti40YseTOmHiKgsKnj1Huv5Dix63yh+gHJ/UsoUdtM3AOx9hGk +VAULT_ENC_KEY=99881ab2ee6fd6b117c6515d02624707 +PG_META_CRYPTO_KEY=//zOggTLvpboywx9EJWfcinlIZqap7AF +LOGFLARE_PUBLIC_ACCESS_TOKEN=OL4nmMrv8wxPK/hkbjxI9Z8pXbbCfid3 +LOGFLARE_PRIVATE_ACCESS_TOKEN=GLL0WlbjsPUd4T8qJ+qk/67vX4A0liMO +POOLER_TENANT_ID=5f67c0171f990b4a +DB_ENC_KEY=da05662fef3735c8 + +POSTGRES_PASSWORD=93ffce1752c16350e89827de6abec9de +DASHBOARD_PASSWORD=cdfd135122a44509e82e9ad856769176 + + + +############ +# Parallel docker config follows - this version of the file would be .env for a second supabase in a new directory +############ + +############ +# DB and Service ports need to be unique +############ +EXT_POSTGRES_PORT=5433 +EXT_POOLER_PORT=6544 +EXT_KONG_HTTP_PORT=8001 + +############ +# Project Info - no spaces. +# This seperates the containers/volumes/networks +# Project name MUST be unique +############ + +COMPOSE_PROJECT_NAME=parallel_project_1 +DASHBOARD_USERNAME=supabase + +############ +# Project and Org Info - spaces are ok +############ +STUDIO_DEFAULT_ORGANIZATION=Your Organization +STUDIO_DEFAULT_PROJECT=Default Project 2 + +############ +# DB Info - should be stable +############ +POSTGRES_HOST=db +POSTGRES_DB=postgres +#POSTGRES_IMAGE=pgvector/pgvector:pg17 +POSTGRES_IMAGE=ghcr.io/webysther/supabase-postgres:15.8.1 + +############ +# Internal Connection Settings (always standard ports) +############ +POSTGRES_HOST=db +POSTGRES_PORT=5432 +POOLER_PORT=6543 +KONG_HTTP_PORT=8000 + diff --git a/docker-compose.yml b/docker-compose.yml index a4b37dd..315a8fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,216 +1,216 @@ -# Variables set to use EXT prefix for all external facing ports (to avoid collions) -# The variables without EXT prefix are internal or global (passwords, etc) -# Defaults are provided for some parameters, but mostly they come from .env. -# DB image is provided from .env, just in case you wish to use the pg17 or custom -# Ideally you don't need to edit this file at all - -# Project name is parameterized to allow multiple instances running in parallel -name: ${PROJECT_NAME} - -x-common: &common - # Network names parameterized - networks: - - internal - env_file: .env - restart: unless-stopped - -services: - studio: - <<: *common - image: ghcr.io/webysther/supabase-studio:2026.01.27 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-studio - # Studio display settings - parameterized for multi-instance clarity - environment: - STUDIO_DEFAULT_ORGANIZATION: ${STUDIO_DEFAULT_ORGANIZATION:-Default Organization} - STUDIO_DEFAULT_PROJECT: ${STUDIO_DEFAULT_PROJECT:-Default Project} - depends_on: - analytics: - condition: service_healthy - volumes: - # Volume references use static keys - - snippets:/app/snippets - - functions:/app/edge-functions - - kong: - <<: *common - image: ghcr.io/webysther/supabase-kong:2.8.1 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-kong - environment: - DASHBOARD_USERNAME: ${DASHBOARD_USERNAME} - ulimits: - nofile: - soft: 4096 - hard: 4096 - networks: - # Network references use static keys - - default - - internal - ports: - # External port parameterized - internal port stays 8000 - - ${EXT_KONG_HTTP_PORT:-8000}:8000/tcp - depends_on: - analytics: - condition: service_healthy - - auth: - <<: *common - image: ghcr.io/webysther/supabase-auth:2.185.0 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-auth - depends_on: - db: - condition: service_healthy - analytics: - condition: service_healthy - - rest: - <<: *common - image: ghcr.io/webysther/supabase-rest:14.3 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-rest - depends_on: - db: - condition: service_healthy - analytics: - condition: service_healthy - - realtime: - <<: *common - image: ghcr.io/webysther/supabase-realtime:2.72.0 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-realtime - ulimits: - nofile: - soft: 10000 - hard: 10000 - depends_on: - db: - condition: service_healthy - analytics: - condition: service_healthy - - storage: - <<: *common - image: ghcr.io/webysther/supabase-storage:1.37.1 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-storage - volumes: - # Volume reference uses static key - - storage:/var/lib/storage - depends_on: - db: - condition: service_healthy - rest: - condition: service_started - imgproxy: - condition: service_started - - imgproxy: - <<: *common - image: ghcr.io/webysther/supabase-img:3.30.1 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-imgproxy - volumes: - # Volume reference uses static key - - storage:/var/lib/storage - - meta: - <<: *common - image: ghcr.io/webysther/supabase-meta:0.95.2 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-meta - depends_on: - db: - condition: service_healthy - analytics: - condition: service_healthy - - functions: - <<: *common - image: ghcr.io/webysther/supabase-functions:1.70.0 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-edge-functions - volumes: - # Volume reference uses static key - - functions:/home/deno/functions - depends_on: - analytics: - condition: service_healthy - - analytics: - <<: *common - image: ghcr.io/webysther/supabase-analytics:1.30.3 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-analytics - #ports: - # Optional analytics port - uncomment and parameterize if needed - # - ${EXT_ANALYTICS_PORT}:4000 - depends_on: - db: - condition: service_healthy - - db: - <<: *common - # DB image is parameterized to allow you to use other images - image: ${POSTGRES_IMAGE} - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-db - environment: - # Database settings - internal port is always 5432 - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - POSTGRES_DB: ${POSTGRES_DB:-postgres} - volumes: - # Volume references use static keys - - db:/var/lib/postgresql/data - - db-config:/etc/postgresql-custom - depends_on: - vector: - condition: service_healthy - - vector: - <<: *common - image: ghcr.io/webysther/supabase-vector:0.28.1 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-vector - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - security_opt: - - "label=disable" - - supavisor: - <<: *common - image: ghcr.io/webysther/supabase-supavisor:2.7.4 - # Container name parameterized to avoid collision - container_name: ${PROJECT_NAME}-pooler - ports: - # External ports parameterized - internal ports stay 5432/6543 - - ${EXT_POSTGRES_PORT:-5432}:5432 - - ${EXT_POOLER_PORT:-6543}:6543 - depends_on: - db: - condition: service_healthy - analytics: - condition: service_healthy - -volumes: - # Static keys with parameterized names to avoid collision - db: - name: ${PROJECT_NAME}-db - db-config: - name: ${PROJECT_NAME}-db-config - functions: - name: ${PROJECT_NAME}-functions - snippets: - name: ${PROJECT_NAME}-snippets - storage: - name: ${PROJECT_NAME}-storage - -networks: - # Static keys with parameterized names to avoid collision - default: - name: ${PROJECT_NAME} - internal: - name: ${PROJECT_NAME}-internal - +# Variables set to use EXT prefix for all external facing ports (to avoid collions) +# The variables without EXT prefix are internal or global (passwords, etc) +# Defaults are provided for some parameters, but mostly they come from .env. +# DB image is provided from .env, just in case you wish to use the pg17 or custom +# Ideally you don't need to edit this file at all + +# Project name is parameterized to allow multiple instances running in parallel +name: ${COMPOSE_PROJECT_NAME} + +x-common: &common + # Network names parameterized + networks: + - internal + env_file: .env + restart: unless-stopped + +services: + studio: + <<: *common + image: ghcr.io/webysther/supabase-studio:2026.01.27 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-studio + # Studio display settings - parameterized for multi-instance clarity + environment: + STUDIO_DEFAULT_ORGANIZATION: ${STUDIO_DEFAULT_ORGANIZATION:-Default Organization} + STUDIO_DEFAULT_PROJECT: ${STUDIO_DEFAULT_PROJECT:-Default Project} + depends_on: + analytics: + condition: service_healthy + volumes: + # Volume references use static keys + - snippets:/app/snippets + - functions:/app/edge-functions + + kong: + <<: *common + image: ghcr.io/webysther/supabase-kong:2.8.1 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-kong + environment: + DASHBOARD_USERNAME: ${DASHBOARD_USERNAME} + ulimits: + nofile: + soft: 4096 + hard: 4096 + networks: + # Network references use static keys + - default + - internal + ports: + # External port parameterized - internal port stays 8000 + - ${EXT_KONG_HTTP_PORT:-8000}:8000/tcp + depends_on: + analytics: + condition: service_healthy + + auth: + <<: *common + image: ghcr.io/webysther/supabase-auth:2.185.0 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-auth + depends_on: + db: + condition: service_healthy + analytics: + condition: service_healthy + + rest: + <<: *common + image: ghcr.io/webysther/supabase-rest:14.3 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-rest + depends_on: + db: + condition: service_healthy + analytics: + condition: service_healthy + + realtime: + <<: *common + image: ghcr.io/webysther/supabase-realtime:2.72.0 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-realtime + ulimits: + nofile: + soft: 10000 + hard: 10000 + depends_on: + db: + condition: service_healthy + analytics: + condition: service_healthy + + storage: + <<: *common + image: ghcr.io/webysther/supabase-storage:1.37.1 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-storage + volumes: + # Volume reference uses static key + - storage:/var/lib/storage + depends_on: + db: + condition: service_healthy + rest: + condition: service_started + imgproxy: + condition: service_started + + imgproxy: + <<: *common + image: ghcr.io/webysther/supabase-img:3.30.1 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-imgproxy + volumes: + # Volume reference uses static key + - storage:/var/lib/storage + + meta: + <<: *common + image: ghcr.io/webysther/supabase-meta:0.95.2 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-meta + depends_on: + db: + condition: service_healthy + analytics: + condition: service_healthy + + functions: + <<: *common + image: ghcr.io/webysther/supabase-functions:1.70.0 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-edge-functions + volumes: + # Volume reference uses static key + - functions:/home/deno/functions + depends_on: + analytics: + condition: service_healthy + + analytics: + <<: *common + image: ghcr.io/webysther/supabase-analytics:1.30.3 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-analytics + #ports: + # Optional analytics port - uncomment and parameterize if needed + # - ${EXT_ANALYTICS_PORT}:4000 + depends_on: + db: + condition: service_healthy + + db: + <<: *common + # DB image is parameterized to allow you to use other images + image: ${POSTGRES_IMAGE} + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-db + environment: + # Database settings - internal port is always 5432 + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB:-postgres} + volumes: + # Volume references use static keys + - db:/var/lib/postgresql/data + - db-config:/etc/postgresql-custom + depends_on: + vector: + condition: service_healthy + + vector: + <<: *common + image: ghcr.io/webysther/supabase-vector:0.28.1 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-vector + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + security_opt: + - "label=disable" + + supavisor: + <<: *common + image: ghcr.io/webysther/supabase-supavisor:2.7.4 + # Container name parameterized to avoid collision + container_name: ${COMPOSE_PROJECT_NAME}-pooler + ports: + # External ports parameterized - internal ports stay 5432/6543 + - ${EXT_POSTGRES_PORT:-5432}:5432 + - ${EXT_POOLER_PORT:-6543}:6543 + depends_on: + db: + condition: service_healthy + analytics: + condition: service_healthy + +volumes: + # Static keys with parameterized names to avoid collision + db: + name: ${COMPOSE_PROJECT_NAME}-db + db-config: + name: ${COMPOSE_PROJECT_NAME}-db-config + functions: + name: ${COMPOSE_PROJECT_NAME}-functions + snippets: + name: ${COMPOSE_PROJECT_NAME}-snippets + storage: + name: ${COMPOSE_PROJECT_NAME}-storage + +networks: + # Static keys with parameterized names to avoid collision + default: + name: ${COMPOSE_PROJECT_NAME} + internal: + name: ${COMPOSE_PROJECT_NAME}-internal + From 27ba0ebd0c1917e25e8cd3ca132a04e4419fbe81 Mon Sep 17 00:00:00 2001 From: MB <675944+MBybee@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:54:34 -0700 Subject: [PATCH 4/4] Delete .env_1 Removed old file --- .env_1 | 65 ---------------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .env_1 diff --git a/.env_1 b/.env_1 deleted file mode 100644 index a11e600..0000000 --- a/.env_1 +++ /dev/null @@ -1,65 +0,0 @@ -############ -# Secrets -############ - -# Generate using `docker run ghcr.io/webysther/supabase-keys` - -ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzcxNTM0MjIwLCJleHAiOjIwODY4OTQyMjB9.neZv8FlGAOLRT7qMw5q2xNSMIbjQYw7SOfp-kxSROkI -SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaXNzIjoic3VwYWJhc2UiLCJpYXQiOjE3NzE1MzQyMjAsImV4cCI6MjA4Njg5NDIyMH0.oQe2gDDnkkUKT7lpvQ-yot1A1ovgHK23cgX08W-C8j8 - -JWT_SECRET=N5omM9R56uNNpCqSdMqJNXdP9I+mrkEUVltXfeYD -SECRET_KEY_BASE=dEUfbm6cf4Y5wjti40YseTOmHiKgsKnj1Huv5Dix63yh+gHJ/UsoUdtM3AOx9hGk -VAULT_ENC_KEY=99881ab2ee6fd6b117c6515d02624707 -PG_META_CRYPTO_KEY=//zOggTLvpboywx9EJWfcinlIZqap7AF -LOGFLARE_PUBLIC_ACCESS_TOKEN=OL4nmMrv8wxPK/hkbjxI9Z8pXbbCfid3 -LOGFLARE_PRIVATE_ACCESS_TOKEN=GLL0WlbjsPUd4T8qJ+qk/67vX4A0liMO -POOLER_TENANT_ID=5f67c0171f990b4a -DB_ENC_KEY=da05662fef3735c8 - -POSTGRES_PASSWORD=93ffce1752c16350e89827de6abec9de -DASHBOARD_PASSWORD=cdfd135122a44509e82e9ad856769176 - - - -############ -# Parallel docker config follows - this version of the file would be .env for a second supabase in a new directory -############ - -############ -# DB and Service ports need to be unique -############ -EXT_POSTGRES_PORT=5433 -EXT_POOLER_PORT=6544 -EXT_KONG_HTTP_PORT=8001 - -############ -# Project Info - no spaces. -# This seperates the containers/volumes/networks -# Project name MUST be unique -############ - -PROJECT_NAME=Parallel_Project_1 -DASHBOARD_USERNAME=supabase - -############ -# Project and Org Info - spaces are ok -############ -STUDIO_DEFAULT_ORGANIZATION=Your Organization -STUDIO_DEFAULT_PROJECT=Default Project 2 - -############ -# DB Info - should be stable -############ -POSTGRES_HOST=db -POSTGRES_DB=postgres -#POSTGRES_IMAGE=pgvector/pgvector:pg17 -POSTGRES_IMAGE=ghcr.io/webysther/supabase-postgres:15.8.1 - -############ -# Internal Connection Settings (always standard ports) -############ -POSTGRES_HOST=db -POSTGRES_PORT=5432 -POOLER_PORT=6543 -KONG_HTTP_PORT=8000 -