+++ /dev/null
-<!DOCTYPE html>
-<html>
- <head>
- <title>irc.openstreetmap.org</title>
- <link rel="stylesheet" href="style.css" />
- </head>
- <body>
- <h1>irc.openstreetmap.org</h1>
- <div>
- <form method="get" action="https://webchat.oftc.net/">
- <table>
- <tr>
- <th>Nickname</th>
- <td><input name="nick" type="text" /></td>
- </tr>
- <tr>
- <th>Channel</th>
- <td>
- <select name="channels">
- <option value="#osm">#osm</option>
- <option value="#osm-dev">#osm-dev</option>
- <option value="#osm-ewg">#osm-ewg</option>
- <option value="#osm-cwg">#osm-cwg</option>
- <option value="#osm-ar">#osm-ar</option>
- <option value="#osm-asia">#osm-asia</option>
- <option value="#osm-au">#osm-au</option>
- <option value="#osm-br">#osm-br</option>
- <option value="#osm-bw">#osm-bw</option>
- <option value="#osm-by">#osm-by</option>
- <option value="#osm-ca">#osm-ca</option>
- <option value="#osm-ch">#osm-ch</option>
- <option value="#osm-cz">#osm-cz</option>
- <option value="#osm-de">#osm-de</option>
- <option value="#osm-dk">#osm-dk</option>
- <option value="#osm-es">#osm-es</option>
- <option value="#osm-fi">#osm-fi</option>
- <option value="#osm-fr">#osm-fr</option>
- <option value="#osm-gb">#osm-gb</option>
- <option value="#osm-gr">#osm-gr</option>
- <option value="#osm-gsoc">#osm-gsoc</option>
- <option value="#osm-ht">#osm-ht</option>
- <option value="#osm-ie">#osm-ie</option>
- <option value="#osm-it">#osm-it</option>
- <option value="#osm-ke">#osm-ke</option>
- <option value="#osm-latam">#osm-latam</option>
- <option value="#osm-local">#osm-local</option>
- <option value="#osm-lv">#osm-lv</option>
- <option value="#osm-nl">#osm-nl</option>
- <option value="#osm-no">#osm-no</option>
- <option value="#osm-nominatim">#osm-nominatim</option>
- <option value="#osm-pl">#osm-pl</option>
- <option value="#osm-pt">#osm-pt</option>
- <option value="#osm-ru">#osm-ru</option>
- <option value="#osm.se">#osm.se</option>
- <option value="#osm-strategic">#osm-strategic</option>
- <option value="#osm-ua">#osm-ua</option>
- <option value="#osm-us">#osm-us</option>
- <option value="#osm-za">#osm-za</option>
- <option value="#osm-zh">#osm-zh</option>
- <option value="#osmf-gm">#osmf-gm</option>
- <option value="#osrm">#osrm</option>
- <option value="#openrailwaymap">#openrailwaymap</option>
- <option value="#hot">#hot</option>
- </select>
- </td>
- </tr>
- <tr>
- <th></th>
- <td><input type="submit" value="Connect" /></td>
- </tr>
- </table>
- </form>
- </div>
- </body>
-</html>
#
include_recipe "apache"
+include_recipe "podman"
+
+docker_external_port = 8092
+
+podman_service "irc.openstreetmap.org" do
+ description "Container service for irc.openstreetmap.org"
+ image "ghcr.io/openstreetmap/irc:latest"
+ ports docker_external_port => "8080"
+end
ssl_certificate "irc.openstreetmap.org" do
domains ["irc.openstreetmap.org", "irc.osm.org"]
notifies :reload, "service[apache2]"
end
-directory "/srv/irc.openstreetmap.org" do
- owner "root"
- group "root"
- mode "755"
-end
-
-remote_directory "/srv/irc.openstreetmap.org/html" do
- source "html"
- owner "root"
- group "root"
- mode "755"
- files_owner "root"
- files_group "root"
- files_mode "644"
-end
+apache_module "proxy_http"
apache_site "irc.openstreetmap.org" do
template "apache.erb"
- directory "/srv/irc.openstreetmap.org/html"
- variables :aliases => ["irc.osm.org"]
+ variables :docker_external_port => docker_external_port, :aliases => ["irc.osm.org"]
end
# DO NOT EDIT - This file is being maintained by Chef
-<VirtualHost *:443>
+<VirtualHost *:80>
ServerName <%= @name %>
+<% @aliases.each do |alias_name| -%>
+ ServerAlias <%= alias_name %>
+<% end -%>
ServerAdmin webmaster@openstreetmap.org
- SSLEngine on
- SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
- SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
-
CustomLog /var/log/apache2/<%= @name %>-access.log combined
ErrorLog /var/log/apache2/<%= @name %>-error.log
- DocumentRoot <%= @directory %>
+ RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+ RedirectPermanent / https://<%= @name %>/
</VirtualHost>
<% unless @aliases.empty? -%>
<% end -%>
ServerAdmin webmaster@openstreetmap.org
+ CustomLog /var/log/apache2/<%= @name %>-access.log combined
+ ErrorLog /var/log/apache2/<%= @name %>-error.log
+
SSLEngine on
SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
- CustomLog /var/log/apache2/<%= @name %>-access.log combined
- ErrorLog /var/log/apache2/<%= @name %>-error.log
-
RedirectPermanent / https://<%= @name %>/
</VirtualHost>
<% end -%>
-<VirtualHost *:80>
+<VirtualHost *:443>
ServerName <%= @name %>
-<% @aliases.each do |alias_name| -%>
- ServerAlias <%= alias_name %>
-<% end -%>
ServerAdmin webmaster@openstreetmap.org
CustomLog /var/log/apache2/<%= @name %>-access.log combined
ErrorLog /var/log/apache2/<%= @name %>-error.log
- RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
- RedirectPermanent / https://<%= @name %>/
-</VirtualHost>
+ SSLEngine on
+ SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
+ SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
+
+ RequestHeader set X-Forwarded-Proto "https"
+ RequestHeader set X-Forwarded-Port "443"
-<Directory <%= @directory %>>
- Require all granted
-</Directory>
+ ProxyPass / http://localhost:<%= @docker_external_port %>/
+ ProxyPreserveHost on
+</VirtualHost>