]> git.openstreetmap.org Git - stateofthemap.git/commitdiff
Add Container and GHA to build main
authorGrant Slater <github@firefishy.com>
Mon, 13 Feb 2023 21:52:35 +0000 (21:52 +0000)
committerGrant Slater <github@firefishy.com>
Mon, 13 Feb 2023 21:52:35 +0000 (21:52 +0000)
.dockerignore [new file with mode: 0644]
.editorconfig [new file with mode: 0644]
.github/dependabot.yml [new file with mode: 0644]
.github/workflows/ci.yml [new file with mode: 0644]
Dockerfile [new file with mode: 0644]
README.md
docker-compose.yml [new file with mode: 0644]

diff --git a/.dockerignore b/.dockerignore
new file mode 100644 (file)
index 0000000..bb32a61
--- /dev/null
@@ -0,0 +1,11 @@
+# Ignore git metadata folder
+.git/
+.github/
+
+# Ignore docker related files
+Dockerfile*
+docker-compose.*
+.dockerignore
+.gitignore
+
+.editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..c0d0101
--- /dev/null
@@ -0,0 +1,11 @@
+# EditorConfig is awesome: https://EditorConfig.org
+
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+trim_trailing_whitespace = true
+insert_final_newline = true
+end_of_line = lf
+indent_size = 2
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644 (file)
index 0000000..376872d
--- /dev/null
@@ -0,0 +1,10 @@
+version: 2
+updates:
+  - package-ecosystem: "bundler"
+    directory: "/"
+    schedule:
+      interval: "weekly"
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "daily"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644 (file)
index 0000000..dc9bd01
--- /dev/null
@@ -0,0 +1,65 @@
+name: ci
+
+on:
+  push:
+    branches:
+      - '**'
+      - '!dependabot/**'
+    tags:
+      - 'v*.*.*'
+  pull_request:
+    branches:
+      - 'master'
+      - 'main'
+      - 'gh-pages'
+  schedule:
+    - cron: '25 3 */7 * *'
+
+concurrency:
+  group: ${{ github.workflow }}-{{ github.head_ref || github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  docker:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Docker meta
+        id: meta
+        uses: docker/metadata-action@v4
+        with:
+          images: |
+            ghcr.io/${{ github.repository }}
+          tags: |
+            type=ref,event=branch
+            type=semver,pattern={{version}}
+            type=semver,pattern={{major}}.{{minor}}
+            type=semver,pattern={{major}}
+            type=raw,value=latest,enable={{is_default_branch}}
+
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v2
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v2
+
+      - name: Login to GitHub Container Registry
+        if: github.event_name != 'pull_request'
+        uses: docker/login-action@v2
+        with:
+          registry: ghcr.io
+          username: ${{ github.repository_owner }}
+          password: ${{ secrets.GITHUB_TOKEN }}
+
+      - name: Build and push
+        uses: docker/build-push-action@v4
+        with:
+          context: .
+          platforms: linux/amd64,linux/arm64
+          push: ${{ github.event_name != 'pull_request' }}
+          tags: ${{ steps.meta.outputs.tags }}
+          labels: ${{ steps.meta.outputs.labels }}
+          cache-from: type=gha
+          cache-to: type=gha,mode=max
diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..74b7dc5
--- /dev/null
@@ -0,0 +1,12 @@
+# https://github.com/nginxinc/docker-nginx-unprivileged
+FROM nginxinc/nginx-unprivileged:stable-alpine as webserver
+
+RUN echo "absolute_redirect off;" >/etc/nginx/conf.d/no-absolute_redirect.conf
+
+COPY . /usr/share/nginx/html
+
+# Test configuration during docker build
+RUN nginx -t
+
+# Port the container will listen on
+EXPOSE 8080
index 356ae84b603ad278e7272701952b532fe4d0bfae..69f255dbfbdd9a6c72a0b45bf5c6926dc3731f93 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,10 +1,8 @@
-# State of the Map
+# State of the Map website
 
-This repository contains various resources used for State of the Map
-web sites. There are a number of branches:
+This repository contains various resources used for State of the Map web sites. There are a number of branches:
 
-* **chooser** source for [stateofthemap.org](https://stateofthemap.org/)
-* **site-2013** source for [2013.stateofthemap.org](https://2013.stateofthemap.org/)
+* **main** source for [stateofthemap.org](https://stateofthemap.org/) "chooser"
 * **resources-2012** additional resources for [2012.stateofthemap.org](https://2012.stateofthemap.org/)
 * **resources-2011** additional resources for [2011.stateofthemap.org](https://2011.stateofthemap.org/)
 * **resources-2010** additional resources for [2010.stateofthemap.org](https://2010.stateofthemap.org/)
@@ -21,3 +19,15 @@ To clone this repository, use
 git clone --single-branch --branch <branch> https://github.com/openstreetmap/stateofthemap.git
 ```
 Replace `<branch>` with the name of the branch you want to clone.
+
+## Other State of the Map website repositories
+
+* https://github.com/openstreetmap/stateofthemap-2022
+* https://github.com/openstreetmap/stateofthemap-2021
+* https://github.com/openstreetmap/stateofthemap-2020
+* https://github.com/openstreetmap/stateofthemap-2019
+* https://github.com/openstreetmap/stateofthemap-2018
+* https://github.com/openstreetmap/stateofthemap-2017
+* https://github.com/openstreetmap/stateofthemap-2016
+* https://github.com/openstreetmap/stateofthemap-2014
+* https://github.com/openstreetmap/stateofthemap-2013
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644 (file)
index 0000000..233316c
--- /dev/null
@@ -0,0 +1,9 @@
+version: '2'
+
+services:
+
+  app:
+    build:
+      context: .
+    ports:
+      - 8080:8080