Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you send compose file? #18

Closed
roysbike opened this issue Feb 15, 2019 · 2 comments
Closed

Can you send compose file? #18

roysbike opened this issue Feb 15, 2019 · 2 comments

Comments

@roysbike
Copy link

Please , send me docker-compose.yml

@Overv
Copy link
Owner

Overv commented Feb 15, 2019

What?

@Istador
Copy link
Contributor

Istador commented Feb 23, 2019

A very rudimentary docker-compose.yml with just the basics to get the idea:

version: "3.7"

volumes:
  openstreetmap-data:
  openstreetmap-rendered-tiles:

services:
  osm:
    image: overv/openstreetmap-tile-server
    command: run
    environment:
    - THREADS=4
    volumes:
    - openstreetmap-data:/var/lib/postgresql/10/main
    - openstreetmap-rendered-tiles:/var/lib/mod_tile
    ports:
    - 0.0.0.0:80:80
    shm_size: 128M
    restart: always

Before the service can be started and used, the database needs to be initialized:

# download PBF file
wget  -O data.osm.pbf  https://download.geofabrik.de/europe/germany/hamburg-latest.osm.pbf

# initializes the database and import the PBF file
docker-compose  run  -v "/`pwd`/data.osm.pbf":/data.osm.pbf  osm  import

# start the service
docker-compose  up  -d

# pre render all tiles on zoom levels 0 to 5
docker-compose  exec  osm  render_list  -a  -f  -m ajt  -z 0  -Z 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants