placemark / placemark

A flexible web-based editor, converter, visualization tool, for geospatial data
https://play.placemark.io/
MIT License
1.18k stars 83 forks source link

Quickstart for deployment #35

Open tmcw opened 7 months ago

tmcw commented 7 months ago

It should be possible to do a quickstart for deployment on platforms that support it. This requires:

Potential options:

Probably Vercel isn't an option because no built-in Postgres?

gregsadetsky commented 7 months ago

hey Tom :-)

thanks for considering this use case (i.e. easy/fast deployment)! I just got Placemark running on Render and just wanted to document the few adjustments/steps in case it could be useful to others.

my fork lives here. changes:

# not real values
"BLOG_RSS_URL": "foo"
"GITHUB_CLIENT_ID": "foo"
"GITHUB_CLIENT_SECRET": "foo"
"GITHUB_ISSUES_TOKEN": "foo"
"NEXT_PUBLIC_WS_HOST": "foo"
"NEXT_PUBLIC_GEOCODE_EARTH_TOKEN": "foo"

# real-ish values
"NEXT_PUBLIC_FILE_LIMIT_MB": "10"
"NEXT_PUBLIC_FILE_WARN_MB": "5"
"TEAM_EMAIL": "example@example.com"
"WFC_QUOTA": "10"
"WFC_QUOTA_ENTERPRISE": "100"

# real values
"DOMAIN": "... render domain ..."
"NEXT_PUBLIC_API_BASE_WITH_SLASH": "https://... render domain .../"
"NEXT_PUBLIC_DOMAIN_WITH_SLASH": "https://... render domain .../"
"NEXT_PUBLIC_MAPBOX_TOKEN": "... real mapbox token ..."
"NEXT_PUBLIC_REPLICACHE_KEY": "... real replicache key ..."
"SESSION_SECRET_KEY": "... secret key ..."

cheers!

rsdavis commented 7 months ago

Thanks for making these notes and changes.

I followed the suggestions for Render, but still got an error for DATABASE_URL is missing. Looking at the render.yaml, my guess is that Render should be populating this env var. I'm new to Render, so I'm not sure why it wasn't working for me. I ended up just setting it to my supabase instance and that worked well.

Also, the .env.example has some POSTGRES_* vars, but looking at /lib/env_server, it seems that these are not being used. Happy to open a PR to remove these if you'd like!

gregsadetsky commented 7 months ago

heya @rsdavis -- the DATABASE_URL should have been populated automatically, yeah

just out of curiosity, did you use the "blueprint" functionality on render to create all of the necessary resources? it's a bit confusing (because there are many ways to do this on render), but I'd recommend:

re: POSTGRES_* variables, that's a good point, although I do see that POSTGRES_PASSWORD seems to be used in the tests..? I didn't try running those

tmcw commented 3 months ago

This repo is now all about the /play version, the fullstack version is at https://github.com/placemark/placemark-fullstack

Deploying simple apps is simple 💯 - there's now a Deploy to Vercel button, and I'm potentially adding more.

knownasilya commented 4 days ago

Replicache doesn't seem to have a way to sign up or anything, were you running your own version of a replicache backend?