Tanzawa blogging system / indieweb ready
-
This is the current state of my cloudron package : https://github.com/rmdes/tanzawa
- git clone
- confirm docker login
- docker build -t username/tanzawa:yourtag . --no-cache
- docker push username/tanzawa:yourtag
- cloudron install --image username/tanzawa:yourtag --no-wait
OR if update
- cloudron update --image username/tanzawa:yourtag --no-wait --app your.cloudron.domain
-
issues I'm having :
the env.sample define an SQLITE database at the root of the image, so I tried to symlink it to /appa/data so that the DB would be backedup but above all writable, the problem is that no matter what I tried, It never worked, in the end my current image has the tanzawa code and the data in the same /app/data space and the only part that works in /app/code is the virtualenv environment used to build the image in the first place.
so the current state of the package is not final, ideally, the entire code should live inside /app/code/ and only staticfiles, media and the SQLite database should be in /app/data/
I tried to find other python packages using sqlite but could find one, so my next step I was thinking of adapting the way the .env defines the variables to build in a way that is closer to how other cloudron packages load environments variables.
I'm also researching for a way to define the sqlite db not from a URL but from a PATH instead, so that I could simple use /app/data/ directly.
if anyone has advice on how to move this forward, I'm taking it
-
-
SQL path : Yes I have finally made it ! thanks to this https://django-environ.readthedocs.io/en/latest/
but thanks @robi
But I still have a few things blocking me, like, tanzawa need to know the domain it is installed into
and this is configured in the .env file but the thing is I don't want people to have to clone the github repo, add their domain, build, push and install to their cloudronIdeally I need to add something so that the domain variable is passed to the .env file before it runs the first DB migration (which create the sql file the first time and apply migration the second time)
Also now in the current state of my dockerfile, I have managed to put all the code in /app/code and only the .env and the staticfile & micropub media folder in /app/data/ which is exactly what I wanted...
So this is moving forward..
-
You can try it with : cloudron install --image buzzworkers/tanzawa:7 --no-wait
and then cloudron update --image buzzworkers/tanzawa:8 --no-wait --app your.domain.com
why these two tags ?
Because I have not figured out how to do the steps of the README.md (tanzawa repo)
in one single shot and directly boot the python server.So tag number 7 setup the database correctly (but then stay in migration loop)
and tag8 comment the migration parts (start.sh) so that the server bootsusing the web terminal to python3 /app/code/apps/manage.py createsuperuser
to create your admin user.Dashboard is at your.domain.com/a/
Wordpress import at your.domain.com/wordpressI would love to have this last steps of the setup completely automated but I lack know-how
-
Another thing I would like to improve : it seems the sql file is run by root (at least the file is owned by root) I don't think it's a good idea/best practice, so I'm wondering if by running the last command of the start.sh, the python server, with gosu cloudon:cloudron would solve this..
-
I'm almost done with it !
- got the sqlite database in /app/data/
- .env file symlink (but can't write to it yet??!!)
- /app/code contains all the code and packaging env
Issues
- I'm not sure what's happening this weekend but my container kept starting in migration loop
- if I recovery into the container and start the python server, all is fine, connected, writable
- when I restart, instead of skipping the steps of migration and start the server, it bootloop in migration, while saying there is no migration to do (obviously, everything is like 1 step before working....Grrrr)
-
@rmdes said in Tanzawa blogging system / indieweb ready:
- when I restart, instead of skipping the steps of migration and start the server, it bootloop in migration, while saying there is no migration to do (obviously, everything is like 1 step before working....Grrrr)
Maybe the migration needs to write somewhere for indicating completion.
-
In this example I think there are some ideas that I can take for Tanzawa, mainly
getting the domain used by cloudron into a variable, which would allow the docker image to be agnostic and not tied/built to a specific domain (mine in my case) -
I never managed to get it working properly, but I have not yet abandoned to package this app, just been super busy on IRL stuff, right now my blog is powered by micro.blog I just wanted something to write & be able to cross-post to different networks (twitter,bluesky,nostr,mastodon) knowing I will be able to export all this data without issues in the future.
But, Tanzawa recommended method to be deployed isn't far away from a deploy on cloudron
so I'm going to reconsider this package when I have a bit more time https://github.com/jamesvandyne/tanzawa/blob/main/Dockerfile.fly -
Perhaps @Kubernetes will be interested?
-
@rmdes said in Tanzawa blogging system / indieweb ready:
i've learned a few stuff packaging go-ssb-rooms
It'd be great to have that package in the App Store. Where is the link/ thread? Thanks!
-
@jdaviescoates Oh I have removed my current broken package long ago, did not wanted people to install something half broken, but I was able to make it run, but not yet using cloudron hooks for domain, users, database, so it was basically just running with sqlite
and it was a bit messy to install.I would really love to see this packaged, it's a neat single-user solution to run a blog, very clean, light
-
There is a remain of my setup here : https://github.com/rmdes/tanzawa
but the setup should be ravamped following the official production ready way to install tanzawa from here https://github.com/jamesvandyne/tanzawa/blob/main/Dockerfile.fly