Closed OffCorner closed 5 years ago
I never tried it on mobile, and neither tried it with couchdb. I'll test it tomorrow. I can probably change some paths in the Golang HTTP server to rewrite and remove /app
from URLS. If you want to give it a try:
git clone https://github.com/qdm12/stackedit-docker.git
cd stackedit-docker
# change main.go
docker build -t qmcgaw/stackedit .
docker run -d -p 8000:8000 qmcgaw/stackedit
It could be an issue with the Dockerfile too, I'll check.
I am feeling a bit miserable about all this... I keep getting an error when building:
go: disabling cache (/.cache/go-build) due to initialization failure: mkdir /.cache: permission denied go: cannot use modules with build cache disabled
It seems like i would have to change "XDG_CACHE_HOME" in go but I have to idea how to do that Link
I think adding the following in the main.go should work, right?
http.HandleFunc("/app", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "/html/"+r.URL.Path[1:]) })
Anyways, thanks for your help!
Hi there, you should only build the docker image, it's much easier and not that slow. Don't bother building the go binary on your host.
I'll cross check with the official repository tomorrow as there may be a missing app directory I forgot to copy over. I will let you know. Thanks for trying to fix the issue :smile: !
I just pushed a rewrite of /app
so that it should work. Let me know if it solves your problem by commenting or closing the issue. Thanks !
Hey there, it works! Thanks a lot for the super fast response every time 👍 Might at some point try to fork stackedit and change a few things around (couchdb only works when the database is public for example) but then I'd also have to fork your stackedit docker container. Or maybe it'd be possible to also set the git url in an environment variable and control it that way? but that all doesn't have anything to do with this issue which is why I am going to close it now. Thanks!
I can set a build argument to the Dockerfile or do another branch with a tag. If you have the time to fork and edit it, just let me know by creating an issue! Thanks.
Hey there, There is a bug where after linking to a workspace, stackedit redirects to the an url that ends with /app and throws a 404 page not found error (i.e. example.com/app#.....) (I managed to setup CouchDB and use that instead of Google Drive) It is possible to just cut out the "app"-part of the url; however, when adding the website to the homescreen on Android and iOS it defaults to this broken url and there is no way of changing this. Maybe I have done some kind of a mistake while installing the docker image.