5 # Copyright:: 2026, OpenStreetMap Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # https://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 include_recipe "podman::apache"
21 include_recipe "postgresql"
22 include_recipe "valkey"
24 glitchtip_passwords = data_bag_item("glitchtip", "passwords")
25 valkey_passwords = data_bag_item("valkey", "passwords")
27 database_cluster = node[:glitchtip][:database_cluster]
28 database_name = node[:glitchtip][:database_name]
29 database_user = node[:glitchtip][:database_user]
30 database_password = glitchtip_passwords[node[:glitchtip][:database_password]]
32 postgresql_user database_user do
33 cluster database_cluster
34 password database_password
37 postgresql_database database_name do
38 cluster database_cluster
42 directory "/srv/glitchtip.openstreetmap.org/uploads" do
49 database_url = "postgres://#{database_user}:#{database_password}@host.containers.internal:5432/#{database_name}"
51 valkey_password = valkey_passwords["glitchtip"]
52 valkey_url = "redis://glitchtip:#{valkey_password}@host.containers.internal:6379"
54 podman_site "glitchtip.openstreetmap.org" do
55 image "docker.io/glitchtip/glitchtip:6"
57 aliases ["glitchtip.osm.org"]
58 environment "DATABASE_URL" => database_url,
59 "VALKEY_URL" => valkey_url,
60 "SECRET_KEY" => glitchtip_passwords["secret"],
61 "EMAIL_URL" => "smtp://host.containers.internal:25",
62 "DEFAULT_FROM_EMAIL" => "admins@openstreetmap.org",
63 "ALLOWED_HOSTS" => "glitchtip.openstreetmap.org,glitchtip.osm.org",
64 "ENABLE_ADMIN" => "False",
65 "ENABLE_OBSERVABILITY_API" => "True",
66 "ENABLE_OPENAPI" => "False",
67 "GLITCHTIP_DOMAIN" => "https://glitchtip.openstreetmap.org",
68 "GLITCHTIP_ENABLE_DUCKDB" => "False",
69 "GLITCHTIP_ENABLE_MCP" => "False",
70 "GLITCHTIP_INSTANCE_NAME" => "OpenStreetMap\\'s GlitchTip",
71 "SERVER_ROLE" => "all_in_one"
72 volumes "/srv/glitchtip.openstreetmap.org/uploads" => "/code/uploads"
75 node.default[:prometheus][:exporters][443] = {
77 :address => "#{node[:prometheus][:address]}:443",
78 :sni => "glitchtip.openstreetmap.org"