diff --git a/README.md b/README.md index 40b9152..217bb68 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# ns8-kickstart +# ns8-joplin This is a template module for [NethServer 8](https://github.com/NethServer/ns8-core). To start a new module from it: -1. Click on [Use this template](https://github.com/NethServer/ns8-kickstart/generate). +1. Click on [Use this template](https://github.com/NethServer/ns8-joplin/generate). Name your repo with `ns8-` prefix (e.g. `ns8-mymodule`). Do not end your module name with a number, like ~~`ns8-baaad2`~~! @@ -13,9 +13,9 @@ To start a new module from it: 1. Rename some references inside the repo: ``` modulename=$(basename $(pwd) | sed 's/^ns8-//') - git mv imageroot/systemd/user/kickstart.service imageroot/systemd/user/${modulename}.service - git mv tests/kickstart.robot tests/${modulename}.robot - sed -i "s/kickstart/${modulename}/g" $(find .github/ * -type f) + git mv imageroot/systemd/user/joplin.service imageroot/systemd/user/${modulename}.service + git mv tests/joplin.robot tests/${modulename}.robot + sed -i "s/joplin/${modulename}/g" $(find .github/ * -type f) git commit -a -m "Repository initialization" ``` @@ -32,16 +32,16 @@ To start a new module from it: Instantiate the module with: - add-module ghcr.io/nethserver/kickstart:latest 1 + add-module ghcr.io/nethserver/joplin:latest 1 The output of the command will return the instance name. Output example: - {"module_id": "kickstart1", "image_name": "kickstart", "image_url": "ghcr.io/nethserver/kickstart:latest"} + {"module_id": "joplin1", "image_name": "joplin", "image_url": "ghcr.io/nethserver/joplin:latest"} ## Configure -Let's assume that the mattermost instance is named `kickstart1`. +Let's assume that the mattermost instance is named `joplin1`. Launch `configure-module`, by setting the following parameters: - `host`: a fully qualified domain name for the application @@ -50,11 +50,16 @@ Launch `configure-module`, by setting the following parameters: Example: +``` +api-cli run module/joplin1/configure-module --data '{"host": "joplin.domain.com","lets_encrypt": false,"http2https": true}' +``` + +Multiple ``` -api-cli run configure-module --agent module/kickstart1 --data - <80/tcp 80b8de25945f-infra d8df02bf6f4a docker.io/library/mariadb:10.11.5 --character-set-s... 9 minutes ago Up 9 minutes 127.0.0.1:20015->80/tcp mariadb-app -9e58e5bd676f docker.io/library/nginx:stable-alpine3.17 nginx -g daemon o... 9 minutes ago Up 9 minutes 127.0.0.1:20015->80/tcp kickstart-app +9e58e5bd676f docker.io/library/nginx:stable-alpine3.17 nginx -g daemon o... 9 minutes ago Up 9 minutes 127.0.0.1:20015->80/tcp joplin-app ``` you can see what environment variable is inside the container ``` -podman exec kickstart-app env +podman exec joplin-app env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm PKG_RELEASE=1 MARIADB_DB_HOST=127.0.0.1 -MARIADB_DB_NAME=kickstart +MARIADB_DB_NAME=joplin MARIADB_IMAGE=docker.io/mariadb:10.11.5 MARIADB_DB_TYPE=mysql container=podman NGINX_VERSION=1.24.0 NJS_VERSION=0.7.12 -MARIADB_DB_USER=kickstart -MARIADB_DB_PASSWORD=kickstart +MARIADB_DB_USER=joplin +MARIADB_DB_PASSWORD=joplin MARIADB_DB_PORT=3306 HOME=/root ``` @@ -148,7 +157,7 @@ HOME=/root you can run a shell inside the container ``` -podman exec -ti kickstart-app sh +podman exec -ti joplin-app sh / # ``` ## Testing @@ -156,7 +165,7 @@ podman exec -ti kickstart-app sh Test the module using the `test-module.sh` script: - ./test-module.sh ghcr.io/nethserver/kickstart:latest + ./test-module.sh ghcr.io/nethserver/joplin:latest The tests are made using [Robot Framework](https://robotframework.org/)