From b1a780088e0a660d3a32fb3f12f4454c14366cde Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Thu, 21 Jun 2018 22:00:51 -0400 Subject: [PATCH] remove unless-stopped, add tag for images --- docker-compose.yml | 10 +++++----- docker-imposm3/importer.py | 3 +-- docker-osmupdate/download.py | 3 +-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b82188d..c82a5d1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,11 +22,10 @@ services: # - "35432:5432" healthcheck: test: "exit 0" - restart: unless-stopped imposm: image: kartoza/docker-osm:imposm-latest - #build: docker-imposm3 + build: docker-imposm3 volumes: # These are sharable to other containers - ./settings:/home/settings @@ -67,10 +66,9 @@ services: - QGIS_STYLE=yes # Use clip in the database - CLIP=no - restart: unless-stopped osmupdate: - #build: docker-osmupdate + build: docker-osmupdate image: kartoza/docker-osm:osmupdate-latest volumes: # These are sharable to other containers @@ -78,6 +76,9 @@ services: - import_done:/home/import_done - import_queue:/home/import_queue - cache:/home/cache + depends_on: + db: + condition: service_healthy environment: # These are all currently the defaults but listed here for your # convenience if you want to change them @@ -98,4 +99,3 @@ services: # seconds between 2 executions of the script # if 0, then no update will be done, only the first initial import from the PBF - TIME=120 - restart: unless-stopped diff --git a/docker-imposm3/importer.py b/docker-imposm3/importer.py index 4138ec8..33321a9 100644 --- a/docker-imposm3/importer.py +++ b/docker-imposm3/importer.py @@ -177,8 +177,7 @@ class Importer(object): self.info('No *.shp detected in %s, so no clipping.' % self.default['SETTINGS']) # In docker-compose, we should wait for the DB is ready. - self.info('The checkup is OK. The container will continue soon, after the database, in 45 seconds.') - sleep(45) + self.info('The checkup is OK.') def create_timestamp(self): """Create the timestamp with the undefined value until the real one.""" diff --git a/docker-osmupdate/download.py b/docker-osmupdate/download.py index 047a86d..48e6b07 100644 --- a/docker-osmupdate/download.py +++ b/docker-osmupdate/download.py @@ -89,8 +89,7 @@ class Downloader(object): else: self.info('OSM PBF file: ' + self.osm_file) - self.info('The checkup is OK. The container will continue soon, after the database, in 45 seconds.') - sleep(45) + self.info('The checkup is OK.') def _check_latest_timestamp(self): """Fetch the latest timestamp."""