Yes we can do the best ever module

This year at the Fosdem, I came to present an helper for the community of developers of NethServer. In short I did a quickstart to build a module with a pseudo web-application (here NGINX) and a database ready to be used by the webapplication

I did two versions

The idea is to use my repo as a template and create a repo on your github : ns8-wordpress

then do a git clone from your repository on your laptop

cd to ns8-wordpress

modify the line

- -- label="org.nethserver.images=docker.io/mariadb:10.11.5 docker.io/nginx:stable-alpine3.17" \
+    --label="org.nethserver.images=docker.io/mariadb:10.11.5 docker.io/wordpress:6.4.2-php8.3-apache" \

trigger the sed version

   modulename=$(basename $(pwd) | sed 's/^ns8-//') && 
   git mv imageroot/systemd/user/kickstart.service imageroot/systemd/user/${modulename}.service && 
   git mv imageroot/systemd/user/kickstart-app.service imageroot/systemd/user/${modulename}-app.service && 
   git mv tests/kickstart.robot tests/${modulename}.robot && 
   sed -i "s/kickstart/${modulename}/g" $(find .github/ * -type f)

then modify in wordpress-app

   MARIADB_ to WORDPRESS_
   NGINX_IMAGE to WORDPRESS_IMAGE

after that commit

git commit -a -m "Repository initialization"

push to your repository

Once the build is ready install it on your server

add-module ghcr.io/foo/wordpress:latest

Then go to the application upper right menu of cluster-admin and configure your virtualhost, press save

TODO: upload the video link

4 Likes


1 Like

https://mirror.de-labrusse.fr/fosdem2024/img0.html

3 Likes

the better one: Diapo 1