Repository navigation
In house hosting with PHP and HTTPS #588
foofoodog
started this conversation in
Show and tell
Replies: 1 comment 1 reply
|
@foofoodog, thank you for writing this down, it will help others who want to host it at home. One correction on my side: in the other thread I wrote that the server store does not work behind Caddy and left |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I run Layerling in docker behind a caddy reverse proxy. Docker provides PHP so saving designs on the server works and caddy provides https so that the service worker loads and offline mode works.
This requires the static site to be created with npm run build and npm run export, as well as the php store folder (shared-projects) created and permissions set (www-data:www-data). The caddy root cert also needs to be trusted by the browser, either imported there directly, or via the OS. A real server with a real dns domain name with a real cert would be better and caddy will auto provision a cert for one, then you can remove the tls internal. It runs fine on the cheapest of DigitalOcean droplets however those will not have the memory to build the app without some hacks, hence the static site archive being added as a release asset here in this repo.
compose.yml
Caddyfile
I am not sure if this is totally the best way to do all of this but it works on my machine 😃. YMMV.
All reactions