gri38
15
Hi. 4 containers
EDIT: I saw your edit: indeed 4.
-
Container 1 (joplin-vieweb-nginx) if to provide the https mechanism. The nginx with certificates.
-
Container 2 (joplin-vieweb-certbot) is to deal with the certificates (create one, renew). It should not be on the same container, for security.
Those 2 containers must be beside the 2 next, because some users will have their own server, certifictaes and so on (serving other apps on the same server). And indeed, one guy asked me how to not use them: he already has his web server and certificates.
Finally, 2 last containers:
-
Container 3 (joplin-terminal-xapi): it brings joplin terminal, with its API (on port 41184, there's a mistake on the schema). And the xapi (extended api) which provides synch endpoints: a node express server that receives those kinds of commands: get synch config, set synch config, get synch progres... and this server interacts with joplin terminal CLI)
I need a nginx on this container because joplin terminal server (data API) only accepts requests from localhost.
- And finally Container 4 the GUI (django-joplin-vieweb). He also need a nginx to serve the statics assets (at least that the way I know how to do).
We could simplify by merging container 3 and 4. That was my initial work, but I ended to split them up. I admit I don't really remember the rational behind. Separate the topics...
I was adviced to split the containers: usually on "standard" applications, we have one conatiner for db, one container for server, one container for serving logs... I try to do like that: on container based on node-alpine for joplin, and one based on python-alpine for django. Also to save the work to build a node-python image and keep them small. But I realize after that I would need an extra nginx on the joplin terminal container.
If I had only one test, I could argue for decoupling, but...
Before I'll write one test, I would prefer write the front part in something like VueJS, and get rid off all the jquery stuff.
That's the story.