forked from MapServer/basemaps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request MapServer#59 from NieuwlandGeo/docker
Docker
- Loading branch information
Showing
8 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
boundaries.sql | ||
osm-*.map | ||
osm-*.log | ||
*.mk | ||
!docker.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
README | ||
land_polygons.* | ||
simplified_land_polygons.* | ||
*.pbf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: '2' | ||
services: | ||
postgis: | ||
build: | ||
context: docker/postgis | ||
# enable for local debug | ||
# ports: | ||
# - "5432:5432" | ||
volumes: | ||
- ".:/app" | ||
webserver: | ||
depends_on: [postgis] | ||
build: | ||
context: docker/webserver | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ".:/app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
OSM_DB_CONNECTION=host=postgis dbname=osm user=osm password=osm port=5432 | ||
OSM_PREFIX=osm_ | ||
OSM_FORCE_POSTGIS_EXTENT=1 | ||
OSM_WMS_SRS=EPSG:900913 EPSG:4326 EPSG:3857 EPSG:28992 | ||
PROJ_LIB=/usr/share/proj/ | ||
|
||
include Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM camptocamp/postgres:10 | ||
|
||
ARG USER_ID=1000 | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
sudo | ||
|
||
RUN groupadd nopwsudo \ | ||
&& echo "%nopwsudo ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/nopwsudo \ | ||
&& useradd mapserveruser -u ${USER_ID} -G nopwsudo,sudo,adm -m | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
git make build-essential python wget unzip mapserver-bin cgi-mapserver | ||
|
||
RUN mkdir /app \ | ||
&& chown -R mapserveruser /app | ||
|
||
# install imposm3 | ||
RUN wget -O imposm3.tgz 'https://github.com/omniscale/imposm3/releases/download/v0.6.0-alpha.4/imposm-0.6.0-alpha.4-linux-x86-64.tar.gz' | ||
RUN tar --strip-components 1 -xzf imposm3.tgz -C /opt | ||
RUN ln -s /opt/imposm /usr/local/bin/imposm | ||
|
||
ADD initdb.sh /docker-entrypoint-initdb.d/initdb.sh | ||
|
||
WORKDIR /app | ||
|
||
ENV POSTGRES_USER osm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL | ||
CREATE EXTENSION postgis; | ||
EOSQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM debian:stretch | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
mapserver-bin cgi-mapserver apache2 libapache2-mod-fcgid \ | ||
git make build-essential python wget unzip | ||
|
||
RUN a2enmod alias fcgid cgid | ||
|
||
ADD run-httpd.sh /run-httpd.sh | ||
RUN chmod -v +x /run-httpd.sh | ||
|
||
WORKDIR /app | ||
|
||
CMD ["/run-httpd.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Apache gets grumpy about PID files pre-existing | ||
rm -f /usr/local/apache2/logs/httpd.pid | ||
|
||
exec apache2ctl -DFOREGROUND |