Skip to content
Open
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2754592
Rearrange OSM2PGSQL_EXTRA_ARGS to allow overriding of existing parame…
Overv Apr 26, 2020
26a4b9f
OSM2PGSQL_EXTRA_ARGS inside quotes
Istador May 15, 2020
6dc84f1
Merge pull request #135 from Istador/patch-1
Overv May 15, 2020
44490df
added a dockerfile version to avoid 'connection closed: RPC failed' e…
Mou97 May 29, 2020
82bc6a3
renamed Dockerfile-badInternet to Dockerfile
Mou97 May 29, 2020
19cb75b
removed git command thats fetches the whole history after a shallow c…
Mou97 May 31, 2020
9fb0743
Fix shallow fetch for openstreetmap-carto
Overv Jun 1, 2020
1093734
Merge branch 'Mou97-master'
Overv Jun 1, 2020
677b524
execute all make calls in parallel
Jun 3, 2020
0e1db36
fix shallow fetch for osm2pgsql and mod-tile
Jun 3, 2020
bcf2cfc
combine several apt install calls
Jun 3, 2020
5a059ab
Merge pull request #140 from Floyddotnet/master
Overv Jun 3, 2020
e79901b
Fix Osmosis configuration change
ph1ll Sep 16, 2020
bedff2a
Merge pull request #150 from ph1ll/patch-1
Overv Sep 17, 2020
9532320
Show progress output for wget by default (fixes #156)
Overv Oct 27, 2020
6fb6293
README: Update link to switch2osm.org tile server guide
jdmonin Feb 6, 2021
2ae828c
Dockerfile: Update same switch2osm.org url as readme
jdmonin Feb 7, 2021
7636079
Merge pull request #164 from jdmonin/readme-switch-url-moved
Overv Feb 10, 2021
a204fb8
Update PostGIS, OpenStreetMap Carto stylesheet and trim_osc.py helper
mhajder Feb 21, 2021
affae5a
Merge pull request #169 from mhajder/feature/update-components
Overv Mar 1, 2021
ec500a2
Upgrade to Ubuntu 20.04
Overv Feb 20, 2021
75e7714
Merge pull request #168 from Overv/ubuntu-20.04
Overv Mar 7, 2021
8f2c575
Carto 5.3.1 integrated (#183)
ruhepuls May 13, 2021
9679b29
Update NodeJS to 14 LTS (#185)
Overv May 13, 2021
85eaca5
Install python-is-python3 for openstreetmap-tiles-update-expire (#201)
jmontleon Jul 3, 2021
7b82bca
Use indexes.sql included with openstreetmap-carto instead of own copy…
Overv Jul 19, 2021
ce176ae
Fix erroneous quotes around WGET_ARGS (fixes #210)
Overv Sep 3, 2021
60ac765
Don't clutter output of usage instructions
Overv Sep 3, 2021
0a4d079
fix naciscdn.org (#212)
prih Sep 7, 2021
4b93ca3
Make the image smaller (#214)
galewis2 Oct 11, 2021
1e684ed
Added E flag (#217)
schteph Oct 11, 2021
7052374
Fix update script no longer working (fixes #222)
Overv Nov 8, 2021
a1cbf0d
Add proper error checking to run script
Overv Dec 11, 2021
672e2cd
Be explicit about intention of double max_wal_size specificiation
Overv Jan 4, 2022
e6e8c2d
Add notes about running without internet connection (#250)
BudDavis Mar 24, 2022
f120371
Upgrade versions (#248)
galewis2 Mar 28, 2022
0f229a0
Allow easier modification of the OpenStreetMap-carto style (#243)
galewis2 Mar 31, 2022
522f664
Build, test and deploy with Github Actions (#260)
Istador Apr 8, 2022
ef7ba04
badge with latest semver tag on docker hub (#262)
Istador Apr 8, 2022
d0673dc
cancel outdated jobs for the same reference (#263)
Istador Apr 9, 2022
cffbd7b
changed volume paths ; FLAT_NODES=enabled (#261)
Istador Apr 9, 2022
5572c97
create /data/database/postgres/ if missing (#273)
Istador May 1, 2022
dc47871
warn about FLAT_NODES w/ UPDATES incompatibility (#282)
Istador May 25, 2022
81c3433
Reduce dependencies for updates, switch to Ubuntu 22.04 (#234)
galewis2 Jul 5, 2022
21b4098
Simplify parsing of timestamp (#294)
galewis2 Jul 15, 2022
afd62f3
multiarch build for additional linux/arm64/v8 support (#292)
Istador Jul 19, 2022
67d127b
Use tile expiration settings from env if set, or default values as be…
balchen Jul 22, 2022
25a661e
Actually allow modifying the replication URL (#297)
galewis2 Jul 22, 2022
005fe69
Added new environment variables for tile expiration to README.md (#299)
balchen Jul 26, 2022
54624a9
Update Dockerfile (#307)
galewis2 Aug 3, 2022
fdacfe7
Add favicon.ico (#316)
leakim Sep 27, 2022
a814c03
upgrade leaflet from v1.7.1 to v1.8.0 (#315)
leakim Sep 27, 2022
10571b7
validate version tags (#308)
Istador Sep 27, 2022
e144c48
readme give possibility to copy/paste command into linux terminal (#368)
Always-prog Mar 18, 2023
f6a6ad8
Fix path for consistency (#314)
galewis2 Mar 18, 2023
61270b8
Add support to PostgreSQL 15 (#356)
curtis18 Mar 18, 2023
6088b9b
upgrade carto from v0.18.2 to v1.2.0 (#355) (#359)
kiddikai Jun 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.github/
/.travis.yml
/docker-compose.yml
/LICENSE
/Makefile
/README.md
189 changes: 189 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
name: Build and test image

on:
push:
branches:
- master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- master

# cancel outdated jobs for the same reference
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
IMAGE : ${{ github.repository_owner }}/openstreetmap-tile-server
TAG : ${{ github.sha }}

jobs:

build:
strategy:
matrix:
include:
- arch : amd64
mode : build-and-test
- arch : arm64
variant : v8
mode : build-only
runs-on: ubuntu-latest
env:
VOLUME : osm-db
CONTAINER : osm-www
MOUNT : /data/database/
PLATFORM : linux/${{ matrix.arch }}${{ (matrix.variant != '' && format('/{0}', matrix.variant)) || '' }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.arch }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Environment
run : |
echo IMAGE=$(echo ${{ env.IMAGE }} | tr '[:upper:]' '[:lower:]') >>$GITHUB_ENV
-
name: Docker build
uses: docker/build-push-action@v3
with:
pull : true
load : ${{ matrix.mode == 'build-and-test' }}
platforms : ${{ env.PLATFORM }}
context : .
file : ./Dockerfile
tags : ${{ env.IMAGE }}:${{ env.TAG }}
cache-from : type=gha,scope=${{ github.workflow }}:${{ env.PLATFORM }}
cache-to : type=gha,scope=${{ github.workflow }}:${{ env.PLATFORM }},mode=max
-
name: Import Luxembourg
if : ${{ matrix.mode == 'build-and-test' }}
run : |
docker volume create ${VOLUME}
docker run --rm --shm-size=128M -v ${VOLUME}:${MOUNT} -e UPDATES=enabled ${IMAGE}:${TAG} import
-
name: Start server
if : ${{ matrix.mode == 'build-and-test' }}
run : |
docker run --shm-size=128M -v ${VOLUME}:${MOUNT} -e UPDATES=enabled -p 80:80 -d --name ${CONTAINER} ${IMAGE}:${TAG} run
sleep 30
docker logs ${CONTAINER}
-
name: Download tiles
if : ${{ matrix.mode == 'build-and-test' }}
run : |
curl http://localhost/tile/0/0/0.png --fail -o 000.png
curl http://localhost/tile/1/0/0.png --fail -o 100.png
curl http://localhost/tile/1/0/1.png --fail -o 101.png
curl http://localhost/tile/1/1/0.png --fail -o 110.png
curl http://localhost/tile/1/1/1.png --fail -o 111.png
curl http://localhost/tile/18/138474/85459.png --fail -o empty.png
curl http://localhost/tile/18/135536/89345.png --fail -o example.png
-
name: Upload tiles
if : ${{ matrix.mode == 'build-and-test' }}
uses: actions/upload-artifact@v3
with:
name: tiles
path: '*.png'
-
name: Verify tiles
if : ${{ matrix.mode == 'build-and-test' }}
run : |
sha1sum *.png
sha1sum --check <<EOF
c226ca747874fb1307eef853feaf9d8db28cef2b *empty.png
EOF
tiles=(`ls *.png`)
for ((i=0; i<${#tiles[@]}; i++)) ; do
if [ `file --brief --mime-type "${tiles[$i]}"` != 'image/png' ] ; then
>&2 echo "ERROR: ${tiles[$i]} is not a image/png file"
exit 1
fi
for ((j=i+1; j<${#tiles[@]}; j++)) ; do
if ( diff "${tiles[$i]}" "${tiles[$j]}" ) ; then
>&2 echo "ERROR: ${tiles[$i]} is identical to ${tiles[$j]}"
exit 2
fi
done
done
-
name: Cleanup
if : ${{ matrix.mode == 'build-and-test' }}
run : |
docker rm --force --volumes ${CONTAINER}
docker volume rm --force ${VOLUME}
docker rmi --force ${IMAGE}:${TAG}

deploy:
runs-on: ubuntu-latest
needs:
- build
if: ${{ github.event_name != 'pull_request' }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Environment
run : |
echo IMAGE=$(echo ${{ env.IMAGE }} | tr '[:upper:]' '[:lower:]') >>$GITHUB_ENV
echo DOCKERHUB_IMAGE=$([ "${{ secrets.DOCKERHUB_USERNAME }}" != '' ] && [ "${{ secrets.DOCKERHUB_PASSWORD }}" != "" ] && echo "$IMAGE") >>$GITHUB_ENV
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.DOCKERHUB_IMAGE }}
ghcr.io/${{ env.IMAGE }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: amd64,arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
if: ${{ env.DOCKERHUB_IMAGE != '' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
-
name: Login to GHCR
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@v3
with:
pull : true
push : true
platforms : linux/amd64,linux/arm64/v8
context : .
file : ./Dockerfile
tags : ${{ steps.meta.outputs.tags }}
labels : ${{ steps.meta.outputs.labels }}
cache-from: |
type=gha,scope=${{ github.workflow }}:linux/amd64
type=gha,scope=${{ github.workflow }}:linux/arm64/v8
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ before_script:
- docker pull overv/openstreetmap-tile-server || true
script:
- docker build --pull --cache-from overv/openstreetmap-tile-server --tag overv/openstreetmap-tile-server .
- docker volume create openstreetmap-data
- docker run --rm -v openstreetmap-data:/var/lib/postgresql/12/main overv/openstreetmap-tile-server import
- docker run --rm -v openstreetmap-data:/var/lib/postgresql/12/main -p 8080:80 -d overv/openstreetmap-tile-server run
- docker volume create osm-data
- docker run --rm -v osm-data:/data/database/ overv/openstreetmap-tile-server import
- docker run --rm -v osm-data:/data/database/ -p 8080:80 -d overv/openstreetmap-tile-server run
- sleep 30
- make DOCKER_IMAGE=overv/openstreetmap-tile-server stop
after_script:
Expand Down
Loading