File tree Expand file tree Collapse file tree 4 files changed +23
-7
lines changed
Expand file tree Collapse file tree 4 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 11# PowerSync Self Hosted Example
22
3+ ## v0.6.0
4+
5+ - Use Supabase Docker networks. This removes the use of ` host.docker.internal ` which is not always available on all Systems.
6+
37## v0.5.2
48
59- Added note for PowerSync service memory limits using the ` NODE_OPTIONS ` environment variable.
Original file line number Diff line number Diff line change 33SUPABASE_URL = http://localhost:54321
44SUPABASE_ANON_KEY =
55
6- # The Supabase Postgres connection is available on the host
7- PG_DATABASE_HOSTNAME = host.docker.internal
6+ # The Supabase Postgres connection is available in the Supabase network
7+ # The Postgres container name is of the form `supabase_db_${project_id}`
8+ # Where `project_id` is configured in the config.toml file.
9+ PG_DATABASE_HOSTNAME = supabase_db_powersync_demo
810PG_DATABASE_NAME = postgres
9- PG_DATABASE_PORT = 5433 # This port has been configured in supabase/config.toml
11+ # This is the port in the Supabase network
12+ # The Postgres DB is exposed on a different port for the host
13+ PG_DATABASE_PORT = 5432
1014PG_DATABASE_USER = postgres
1115PG_DATABASE_PASSWORD = postgres
1216PS_DATA_SOURCE_URI = postgres://${ PG_DATABASE_USER } :${ PG_DATABASE_PASSWORD } @${ PG_DATABASE_HOSTNAME } :${ PG_DATABASE_PORT } /${ PG_DATABASE_NAME }
Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ services:
1515 condition : service_completed_successfully
1616 volumes :
1717 - ./config:/config
18- environment :
19- PS_PG_URI : postgres://${PG_DATABASE_USER}:${PG_DATABASE_PASSWORD}@${PG_DATABASE_HOSTNAME}:${PG_DATABASE_PORT}/${PG_DATABASE_NAME}
18+ networks :
19+ - default
20+ - supabase_network_powersync_demo
2021
2122 demo-client :
2223 build :
@@ -27,3 +28,10 @@ services:
2728 VITE_POWERSYNC_URL : http://localhost:${PS_PORT}
2829 ports :
2930 - 4170:4173
31+
32+ # Supabase exposes their services on this network
33+ networks :
34+ # This is derived from `supabase_network_${project_id}`
35+ # Where project_id is defined in the `config.toml` file.
36+ supabase_network_powersync_demo :
37+ external : true
Original file line number Diff line number Diff line change 11# A string used to distinguish different Supabase projects on the same host. Defaults to the
22# working directory name when running `supabase init`.
3- project_id = " project "
3+ project_id = " powersync_demo "
44
55[api ]
66enabled = true
@@ -17,7 +17,7 @@ max_rows = 1000
1717
1818[db ]
1919# Port to use for the local database URL.
20- port = 5433
20+ port = 54322
2121# Port used by db diff command to initialize the shadow database.
2222shadow_port = 54320
2323# The database major version to use. This has to be the same as your remote database's. Run `SHOW
You can’t perform that action at this time.
0 commit comments