Merge pull request #83 from kinduff/services/linkding

Adds support for Linkding
This commit is contained in:
Slavi Pantaleev 2023-07-21 16:52:42 +03:00 committed by GitHub
commit 2ea79bdf2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 120 additions and 0 deletions

52
docs/services/linkding.md Normal file
View file

@ -0,0 +1,52 @@
# Linkding
[Linkding](https://github.com/sissbruecker/linkding) bookmark manager that is designed be to be minimal and fast.
## Dependencies
This service requires the following other services:
- a [Postgres](postgres.md) database, but [SQLite](https://www.sqlite.org/) is also a possibility (see `linkding_database_engine` below)
- a [Traefik](traefik.md) reverse-proxy server
## Configuration
To enable this service, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process:
```yaml
########################################################################
# #
# linkding #
# #
########################################################################
linkding_enabled: true
linkding_hostname: mash.example.com
linkding_path_prefix: /linkding
# We configure Linkding to use Postgres by default. See docs/services/postgres.md.
# To use an external Postgres server, you need to tweak additional `linkding_database_*` variables.
# Feel free to remove the line below to make Linkding use SQLite.
linkding_database_engine: postgres
linkding_superuser_username: change me
linkding_superuser_password: change me
########################################################################
# #
# /linkding #
# #
########################################################################
```
In the example configuration above, we configure the service to be hosted at `https://mash.example.com/linkding`.
You can remove the `linkding_path_prefix` variable definition, so that the service is served at `https://mash.example.com/`.
### Superuser
Please note the use of [`linkding_superuser_username`](https://github.com/sissbruecker/linkding/blob/master/docs/Options.md#ld_superuser_name) and [`linkding_superuser_password`](https://github.com/sissbruecker/linkding/blob/master/docs/Options.md#ld_superuser_password) variables. These are not mandatory and are meant to be set the first time you run this role.
## Usage
After installation, you can log in with your superuser login (`linkding_superuser_username`) and password (`linkding_superuser_password`).

View file

@ -26,6 +26,7 @@
| [Jitsi](https://jitsi.org/) | A fully encrypted, 100% Open Source video conferencing solution | [Link](services/jitsi.md) |
| [Keycloak](https://www.keycloak.org/) | An open source identity and access management solution. | [Link](services/keycloak.md) |
| [Lago](https://www.getlago.com/) | Open-source metering and usage-based billing | [Link](services/lago.md) |
| [linkding](https://github.com/sissbruecker/linkding/) | Bookmark manager designed to be minimal and fast. | [Link](services/linkding.md) |
| [MariaDB](https://mariadb.org/) | A powerful, open source object-relational database system | [Link](services/mariadb.md) |
| [Matrix Rooms Search API](https://gitlab.com/etke.cc/mrs/api) | A fully-featured, standalone, matrix rooms search service. | [Link](services/mrs.md) |
| [MongoDB](https://www.mongodb.com/) | A source-available cross-platform document-oriented (NoSQL) database program. | [Link](services/mongodb.md) |

View file

@ -149,6 +149,8 @@ devture_systemd_service_manager_services_list_auto: |
+
([{'name': (lago_identifier + '-pdf.service'), 'priority': 1900, 'groups': ['mash', 'lago', 'lago-pdf']}] if lago_enabled else [])
+
([{'name': (linkding_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'linkding']}] if linkding_enabled else [])
+
([{'name': (miniflux_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'miniflux']}] if miniflux_enabled else [])
+
([{'name': (mongodb_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'mongodb']}] if mongodb_enabled else [])
@ -241,6 +243,8 @@ devture_postgres_systemd_services_to_stop_for_maintenance_list: |
+
([(n8n_identifier + '.service')] if n8n_enabled else [])
+
([(linkding_identifier + '.service')] if linkding_enabled and linkding_database_engine == 'postgres' else [])
+
([(redmine_identifier + '.service')] if redmine_enabled else [])
}}
@ -305,6 +309,12 @@ devture_postgres_managed_databases_auto: |
'password': lago_database_password,
}] if lago_enabled and lago_database_hostname == devture_postgres_identifier else [])
+
([{
'name': linkding_database_name,
'username': linkding_database_username,
'password': linkding_database_password,
}] if linkding_enabled and linkding_database_engine == 'postgres' else [])
+
([{
'name': miniflux_database_name,
'username': miniflux_database_username,
@ -1334,6 +1344,14 @@ hubsite_service_n8n_logo_location: "{{ role_path }}/assets/n8n.png"
hubsite_service_n8n_description: "Workflow automation for technical people."
hubsite_service_n8n_priority: 1000
# Linkding
hubsite_service_linkding_enabled: "{{ linkding_enabled }}"
hubsite_service_linkding_name: Linkding
hubsite_service_linkding_url: "https://{{ linkding_hostname }}{{ linkding_path_prefix }}"
hubsite_service_linkding_logo_location: "{{ role_path }}/assets/linkding.png"
hubsite_service_linkding_description: "Bookmark manager that is designed be to be minimal and fast."
hubsite_service_linkding_priority: 1000
# Nextcloud
hubsite_service_nextcloud_enabled: "{{ nextcloud_enabled }}"
hubsite_service_nextcloud_name: Nextcloud
@ -1431,6 +1449,8 @@ hubsite_service_list_auto: |
+
([{'name': hubsite_service_nextcloud_name, 'url': hubsite_service_nextcloud_url, 'logo_location': hubsite_service_nextcloud_logo_location, 'description': hubsite_service_nextcloud_description, 'priority': hubsite_service_nextcloud_priority}] if hubsite_service_nextcloud_enabled else [])
+
([{'name': hubsite_service_linkding_name, 'url': hubsite_service_linkding_url, 'logo_location': hubsite_service_linkding_logo_location, 'description': hubsite_service_linkding_description, 'priority': hubsite_service_linkding_priority}] if hubsite_service_linkding_enabled else [])
+
([{'name': hubsite_service_owncast_name, 'url': hubsite_service_owncast_url, 'logo_location': hubsite_service_owncast_logo_location, 'description': hubsite_service_owncast_description, 'priority': hubsite_service_owncast_priority}] if hubsite_service_owncast_enabled else [])
+
([{'name': hubsite_service_peertube_name, 'url': hubsite_service_peertube_url, 'logo_location': hubsite_service_peertube_logo_location, 'description': hubsite_service_peertube_description, 'priority': hubsite_service_peertube_priority}] if hubsite_service_peertube_enabled else [])
@ -1749,6 +1769,48 @@ lago_api_environment_variable_encryption_key_derivation_salt: "{{ '%s' | format(
# #
########################################################################
########################################################################
# #
# linkding #
# #
########################################################################
linkding_enabled: false
linkding_identifier: "{{ mash_playbook_service_identifier_prefix }}linkding"
linkding_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}linkding"
linkding_uid: "{{ mash_playbook_uid }}"
linkding_gid: "{{ mash_playbook_gid }}"
linkding_systemd_required_services_list: |
{{
(['docker.service'])
+
([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and linkding_database_hostname == devture_postgres_identifier else [])
}}
linkding_container_additional_networks: |
{{
([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else [])
+
([devture_postgres_container_network] if devture_postgres_enabled and linkding_database_hostname == devture_postgres_identifier and linkding_container_network != devture_postgres_container_network else [])
}}
linkding_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}"
linkding_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}"
linkding_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
linkding_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
linkding_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
linkding_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'linkding.db', rounds=655555) | to_uuid }}"
########################################################################
# #
# /linkding #
# #
########################################################################
########################################################################

View file

@ -100,6 +100,9 @@
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-lago.git
version: v0.40.0-0
name: lago
- src: git+https://github.com/kinduff/ansible-docker-linkding.git
version: v1.9.0
name: linkding
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-mariadb.git
version: v10.11.4-0
name: mariadb

View file

@ -108,6 +108,8 @@
- role: galaxy/lago
- role: galaxy/linkding
- role: galaxy/mobilizon
- role: galaxy/mosquitto