Skip to content

Commit

Permalink
Add versatiles, a tile server for Open Street Map Data (#270)
Browse files Browse the repository at this point in the history
* feat: Add versatiles

* chore: Bump versatiles roleversion v0.12.6-1 -> v0.12.6-1

* feat: add versatiles, reorder alpabetically

* docs: Add versatile docs

* Minor fixups

---------

Co-authored-by: Slavi Pantaleev <[email protected]>
  • Loading branch information
moan0s and spantaleev authored Sep 30, 2024
1 parent 6754f8a commit 922fc27
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 1 deletion.
Binary file added docs/assets/versatiles-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/versatiles-map-example.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions docs/services/versatiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Versatiles

![Versatiles Logo](../assets/versatiles-logo.png)

[Versatiles](https://versatiles.org) is a a free stack for generating and serving vector tiles based on [OpenStreetMap](https://openstreetmap.com) data.


## Dependencies

This service requires the following other services:

- 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
########################################################################
# #
# versatiles #
# #
########################################################################

versatiles_enabled: true

versatiles_hostname: tiles.example.com

########################################################################
# #
# /versatiles #
# #
########################################################################
```

In the example configuration above, we configure the service to be hosted at `https://tiles.example.com/`.


## Usage

After installation, you should be able to access your new Versatiles instance at: `https://tiles.example.com`.

![Map of Dresden](../assets/versatiles-map-example.jpeg)


To embed the map in a website Copy & Paste the following snippet and replace `tiles.example.com` with your `versatiles_hostname`.

```html
<!-- add MapLibre JavaScript and CSS -->
<script src="https://tiles.example.com/assets/maplibre-gl/maplibre-gl.js"></script>
<link href="https://tiles.example.com/assets/maplibre-gl/maplibre-gl.css" rel="stylesheet" />

<!-- add container for the map -->
<div id="map" style="width:100%;aspect-ratio:16/9"></div>

<!-- start map -->
<script>
new maplibregl.Map({
container: 'map',
style: 'https://tiles.example.com/assets/styles/colorful.json'
}).addControl(new maplibregl.NavigationControl());
</script>
```

For adjustments, check out the amazing [examples from maplibre](https://maplibre.org/maplibre-gl-js/docs/examples/).
3 changes: 2 additions & 1 deletion docs/supported-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@
| [Tandoor](https://docs.tandoor.dev/) | The recipe manager that allows you to manage your ever growing collection of digital recipes.| [Link](services/tandoor.md)
| [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) | An open source server agent to help you collect metrics from your stacks, sensors, and systems. | [Link](services/telegraf.md) |
| [Traefik](https://doc.traefik.io/traefik/) | A container-aware reverse-proxy server | [Link](services/traefik.md) |
| [Vaultwarden](https://github.com/dani-garcia/vaultwarden) | A lightweight unofficial and compatible implementation of the [Bitwarden](https://bitwarden.com/) password manager | [Link](services/vaultwarden.md) |
| [Uptime-kuma](https://uptime.kuma.pet/) | A fancy self-hosted monitoring tool | [Link](services/uptime-kuma.md) |
| [Vaultwarden](https://github.com/dani-garcia/vaultwarden) | A lightweight unofficial and compatible implementation of the [Bitwarden](https://bitwarden.com/)password manager | [Link](services/vaultwarden.md) |
| [Versatiles](https://versatiles.org) | A free stack for generating and serving vector tiles from OpenStreetMap. | [Link](services/versatiles.md) |
| [Wetty](https://github.com/butlerx/wetty) | An SSH terminal over HTTP/HTTPS | [Link](services/wetty.md) |
| [WireGuard Easy](https://github.com/wg-easy/wg-easy) | The easiest way to run [WireGuard](https://www.wireguard.com/) VPN + Web-based Admin UI. | [Link](services/wg-easy.md) |
| [Forgejo](https://forgejo.org/) | An alternative fork of Gitea. Easy and painless self-hosted git server. | [Link](services/forgejo.md) |
Expand Down
35 changes: 35 additions & 0 deletions templates/group_vars_mash_servers
Original file line number Diff line number Diff line change
Expand Up @@ -5478,6 +5478,41 @@ uptime_kuma_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_



# role-specific:versatiles
########################################################################
# #
# versatiles #
# #
########################################################################

versatiles_enabled: false

versatiles_identifier: "{{ mash_playbook_service_identifier_prefix }}versatiles"

versatiles_uid: "{{ mash_playbook_uid }}"
versatiles_gid: "{{ mash_playbook_gid }}"

versatiles_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}versatiles"

versatiles_container_additional_networks_auto: |
{{
([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else [])
}}

versatiles_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}"
versatiles_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}"
versatiles_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
versatiles_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"

########################################################################
# #
# /versatiles #
# #
########################################################################
# /role-specific:versatiles



# role-specific:wg_easy
########################################################################
# #
Expand Down
4 changes: 4 additions & 0 deletions templates/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@
version: v1.32.0-0
name: vaultwarden
activation_prefix: vaultwarden_
- src: git+https://github.com/moan0s/ansible-role-versatiles.git
version: v0.12.6-1
name: versatiles
activation_prefix: versatiles_
- src: git+https://github.com/spatterIight/ansible-role-wetty.git
version: v2.5-0
name: wetty
Expand Down
4 changes: 4 additions & 0 deletions templates/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,10 @@
- role: galaxy/woodpecker_ci_server
# /role-specific:woodpecker_ci_server

# role-specific:versatiles
- role: galaxy/versatiles
# /role-specific:versatiles

# role-specific:woodpecker_ci_agent
- role: galaxy/woodpecker_ci_agent
# /role-specific:woodpecker_ci_agent
Expand Down

0 comments on commit 922fc27

Please sign in to comment.