pgdata:
  image: "tianon/true"
  volumes:
  - /var/lib/postgresql/data
rabbitdata:
  image: "tianon/true"
  volumes:
  - /var/lib/rabbitmq
cache:
  image: "tianon/true"
  volumes:
  - /data/cache
postgis:
  image: "osm2vectortiles/postgis"
  volumes_from:
   - pgdata
  ports:
   - "5432"
import-osm:
  image: "osm2vectortiles/import-osm"
  command: ./import-pbf.sh
  volumes:
   - ./import:/data/import
  volumes_from:
   - cache
  links:
   - postgis:db
import-osm-diff:
  image: "osm2vectortiles/import-osm"
  command: ./import-diff.sh
  volumes:
   - ./import:/data/import
   - ./src/import-osm:/usr/src/app
  volumes_from:
   - cache
  links:
   - postgis:db
update-osm-diff:
  image: "osm2vectortiles/import-osm"
  command: ./import-osmupdate.sh
  volumes:
   - ./import:/data/import
  environment:
     OSM_UPDATE_BASEURL: "http://download.geofabrik.de/europe/switzerland-updates/"
import-external:
  image: "osm2vectortiles/import-external"
  links:
  - postgis:db
import-labels:
  image: "osm2vectortiles/import-external"
  command: ./import-labels.sh
  links:
  - postgis:db
import-natural-earth:
  image: "osm2vectortiles/import-external"
  command: ./import-natural-earth.sh
  links:
  - postgis:db
import-water:
  image: "osm2vectortiles/import-external"
  command: ./import-water.sh
  links:
  - postgis:db
changed-tiles:
  image: "osm2vectortiles/changed-tiles"
  volumes:
   - ./export:/data/export
  links:
  - postgis:db
generate-jobs:
  image: "osm2vectortiles/generate-jobs"
  volumes:
   - ./export:/data/export
merge-jobs:
  image: "osm2vectortiles/merge-jobs"
  volumes:
   - ./export:/data/export
  links:
   - rabbitmq:rabbitmq
   - mock-s3:mock-s3
export-worker:
  image: "osm2vectortiles/export"
  command: ./export-worker.sh
  volumes:
   - ./osm2vectortiles.tm2source:/data/tm2source
  links:
   - postgis:db
   - rabbitmq:rabbitmq
   - mock-s3:mock-s3
  environment:
    AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
    AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
    AWS_REGION: "eu-central-1"
export:
  image: "osm2vectortiles/export"
  command: ./export-local.sh
  volumes:
   - ./export:/data/export
   - ./osm2vectortiles.tm2source:/data/tm2source
  links:
   - postgis:db
  environment:
    # Around zurich
    BBOX: "8.32,47.21,8.83,47.52"
    MIN_ZOOM: "0"
    MAX_ZOOM: "14"
export-list:
  image: "osm2vectortiles/export"
  command: ./export-list.sh
  volumes:
   - ./export:/data/export
   - ./osm2vectortiles.tm2source:/data/tm2source
  links:
   - postgis:db
serve:
  image: "klokantech/tileserver-mapnik"
  volumes:
   - ./export:/data
  ports:
   - "8080:80"
import-sql:
  image: "osm2vectortiles/import-sql"
  links:
   - postgis:db
  environment:
    SQL_CREATE_INDIZES: 'false'
mapbox-studio:
  image: "osm2vectortiles/mapbox-studio"
  volumes:
   - ./osm2vectortiles.tm2source:/projects/osm2vectortiles.tm2source
  links:
   - postgis:db
  ports:
   - "3000:3000"
rabbitmq:
  image: "osm2vectortiles/rabbitmq:management"
  ports:
  - "15672:15672"
  - "5672:5672"
  volumes_from:
   - rabbitdata
  environment:
    RABBITMQ_DEFAULT_USER: "osm"
    RABBITMQ_DEFAULT_PASS: "osm"
    RABBITMQ_HEARTBEAT: "0"
create-extracts:
  image: "osm2vectortiles/create-extracts"
  volumes:
   - ./export:/data/export
  environment:
    S3_ACCESS_KEY: "${S3_ACCESS_KEY}"
    S3_SECRET_KEY: "${S3_SECRET_KEY}"
mock-s3:
  image: "ianblenke/mock-s3"
  ports:
   - "8080"
compare-visual:
  image: "osm2vectortiles/compare-visual"
  ports:
   - "3030:3030"
  volumes:
   - ./osm2vectortiles.tm2source:/data/tm2source
  links:
   - postgis:db
mapping-qa-report:
  image: "osm2vectortiles/mapping-qa-report"
  links:
   - postgis:db
  volumes:
   - ./export:/data
