How to start a new Zotonic based project?

17 views
Skip to first unread message

Carlo Ascani

unread,
Jan 4, 2024, 1:15:07 AMJan 4
to Zotonic developers
Greetings,

I want to pitch (for the second time) Zotonic at the company I am working for.

This time I have a better plan:
I want to build a CMS to manage a conference website, and I want to do it right,
with tests, a somehow nice frontend, fake data and an easy deploy process
on an Hetzner vps.

IIUC you can't just add Zotonic as a dependency in a rebar project,
you have to bring in the whole source code, so my question is:
- How do you organize the source code for a website?

- Do I have to fork and clone Zotonic source and work there?
- If so, how could I keep the Zotonic part of the repo in sync with upstream?
- Are there any other strategies?

Thank you and Happy New Year to all of you!
Cheers

Carlo
   

Marc Worrell

unread,
Jan 4, 2024, 9:11:11 AMJan 4
to 'Marc Worrell' via Zotonic developers
Hi,

We have a init file that can be used for Hetzner instances.


What we often do is:

- The above script
- Checkout the website repo on the correct branch into ~zotonic/
- Symlink from ~zotonic/zotonic/apps_user/  to the website repo
- We also make sure that there is a local priv/zotonic_site.config or that in priv/config.d/ there is a config with the local information.
- Just run Zotonic from ~zotonic/zotonic with "bin/zotonic start"

You can also add this start command to the startup scripts of the server, so that after reboot the site will start.

As the site is now checked out from git, a deploy is just a click on the update button in /admin/status

We periodically just update zotonic from upstream, also with git pull.
Normally this can be done as a hot code upgrade, otherwise a quick stop, pull, make, start will do the trick.

The above is the lazy and low-tech approach.
At Driebit they work with Docker images.
And on our wish list for this year is to start making real releases (looking into some rebar3 issue for that…)

If you enable and configure mod_filestore and mod_backup, then you can have extra backups of all your data on a storage box.
(Besides the backups that Hetzner is doing for you.)

If the rebar3 issue is resolved then we can release Zotonic 1.0 and will update all Hex packages.

Cheers!

Marc




--

---
You received this message because you are subscribed to the Google Groups "Zotonic developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotonic-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zotonic-developers/8bf82611-aaba-4aa3-842e-09cf10e4a27bn%40googlegroups.com.

Carlo Ascani

unread,
Jan 5, 2024, 3:39:12 AMJan 5
to zotonic-d...@googlegroups.com
TIL about cloud-init, looks interesting!


We have still to update it for Ubuntu 22 - currently you can do an upgrade after installation.

What we often do is:

- The above script
- Checkout the website repo on the correct branch into ~zotonic/
- Symlink from ~zotonic/zotonic/apps_user/  to the website repo
- We also make sure that there is a local priv/zotonic_site.config or that in priv/config.d/ there is a config with the local information.
- Just run Zotonic from ~zotonic/zotonic with "bin/zotonic start"

You can also add this start command to the startup scripts of the server, so that after reboot the site will start.

As the site is now checked out from git, a deploy is just a click on the update button in /admin/status

We periodically just update zotonic from upstream, also with git pull.
Normally this can be done as a hot code upgrade, otherwise a quick stop, pull, make, start will do the trick.

The above is the lazy and low-tech approach.

Sounds right for our typical use case, as we don't have mission-critical websites.
 
Thank you
Carlo

Reply all
Reply to author
Forward
0 new messages