- snmpd
- spamassassin
- ssl
- - stateofthemap
- stateofthemap-container
- stateofthemap-wordpress
- subversion
- name: ssl
run_list:
- recipe[ssl::default]
- - name: stateofthemap
- run_list:
- - recipe[stateofthemap::default]
- name: stateofthemap-container
run_list:
- recipe[stateofthemap::container]
version "1.0.0"
supports "ubuntu"
depends "apache"
-depends "git"
depends "podman"
depends "wordpress"
apache_module "proxy_http"
+docker_external_port = 8096
+
+podman_service "www.stateofthemap.org" do
+ description "Container service for www.stateofthemap.org"
+ image "ghcr.io/openstreetmap/stateofthemap-website:latest"
+ ports docker_external_port => "8080"
+end
+
+ssl_certificate "stateofthemap.org" do
+ domains ["stateofthemap.org", "www.stateofthemap.org",
+ "stateofthemap.com", "www.stateofthemap.com",
+ "sotm.org", "www.sotm.org"]
+ notifies :reload, "service[apache2]"
+end
+
+apache_site "stateofthemap.org" do
+ template "apache.container.erb"
+ variables :docker_external_port => docker_external_port, :aliases => ["www.stateofthemap.org", "stateofthemap.com", "www.stateofthemap.com", "sotm.org", "www.sotm.org"]
+end
+
%w[2013 2016 2017 2018 2019 2020 2021 2022].each do |year|
docker_external_port = 6180 + year.to_i # 8193+
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
-include_recipe "apache"
-include_recipe "git"
-
-apache_module "expires"
-
-git "/srv/stateofthemap.org" do
- action :sync
- repository "https://git.openstreetmap.org/public/stateofthemap.git"
- revision "chooser"
- depth 1
- user "root"
- group "root"
-end
-
-ssl_certificate "stateofthemap.org" do
- domains ["stateofthemap.org", "www.stateofthemap.org",
- "stateofthemap.com", "www.stateofthemap.com",
- "sotm.org", "www.sotm.org"]
- notifies :reload, "service[apache2]"
-end
-
-apache_site "stateofthemap.org" do
- template "apache.erb"
- directory "/srv/stateofthemap.org"
-end
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-
-<VirtualHost *:80>
- ServerName stateofthemap.org
- ServerAlias stateofthemap.com
- ServerAlias sotm.org
- ServerAlias www.stateofthemap.org
- ServerAlias www.stateofthemap.com
- ServerAlias www.sotm.org
- ServerAdmin webmaster@openstreetmap.org
-
- CustomLog /var/log/apache2/stateofthemap.org-access.log combined
- ErrorLog /var/log/apache2/stateofthemap.org-error.log
-
- RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
- RedirectPermanent / https://stateofthemap.org/
-</VirtualHost>
-
-<VirtualHost *:443>
- ServerName stateofthemap.com
- ServerAlias sotm.org
- ServerAlias www.stateofthemap.org
- ServerAlias www.stateofthemap.com
- ServerAlias www.sotm.org
- ServerAdmin webmaster@openstreetmap.org
-
- CustomLog /var/log/apache2/stateofthemap.org-access.log combined
- ErrorLog /var/log/apache2/stateofthemap.org-error.log
-
- SSLEngine on
- SSLCertificateFile /etc/ssl/certs/stateofthemap.org.pem
- SSLCertificateKeyFile /etc/ssl/private/stateofthemap.org.key
-
- RedirectPermanent / https://stateofthemap.org/
-</VirtualHost>
-
-<VirtualHost *:443>
- ServerName stateofthemap.org
- ServerAdmin webmaster@openstreetmap.org
-
- CustomLog /var/log/apache2/stateofthemap.org-access.log combined
- ErrorLog /var/log/apache2/stateofthemap.org-error.log
-
- SSLEngine on
- SSLCertificateFile /etc/ssl/certs/stateofthemap.org.pem
- SSLCertificateKeyFile /etc/ssl/private/stateofthemap.org.key
-
- DocumentRoot /srv/stateofthemap.org/html
-
- ErrorDocument 404 /404.html
-
- ExpiresActive On
- ExpiresDefault "access plus 12 hours"
-</VirtualHost>
-
-<Directory /srv/stateofthemap.org/html>
- Require all granted
-</Directory>
+++ /dev/null
-require "serverspec"
-
-# Required by serverspec
-set :backend, :exec
-
-describe package("apache2") do
- it { should be_installed }
-end
-
-describe service("apache2") do
- it { should be_enabled }
- it { should be_running }
-end
-
-describe port(80) do
- it { should be_listening.with("tcp") }
-end
-
-describe port(443) do
- it { should be_listening.with("tcp") }
-end