kopia lustrzana https://github.com/kartoza/docker-osm
add commands to makefile
rodzic
f164bea4af
commit
3226af176b
|
@ -8,3 +8,4 @@ settings/*.state.txt
|
|||
settings/*.poly
|
||||
settings/last.state.txt
|
||||
settings/custom_url_diff.txt
|
||||
settings/timestamp.txt
|
16
Makefile
16
Makefile
|
@ -34,4 +34,18 @@ rm: kill
|
|||
@echo "------------------------------------------------------------------"
|
||||
@echo "Removing production instance!!! "
|
||||
@echo "------------------------------------------------------------------"
|
||||
@docker-compose -p $(PROJECT_ID) rm
|
||||
@docker-compose -p $(PROJECT_ID) rm
|
||||
|
||||
ipdb:
|
||||
@echo
|
||||
@echo "------------------------------------------------------------------"
|
||||
@echo "Database's IP"
|
||||
@echo "------------------------------------------------------------------"
|
||||
@docker inspect $(PROJECT_ID)_db_1 | grep '"IPAddress"' | head -1 | cut -d '"' -f 4
|
||||
|
||||
timestamp:
|
||||
@echo
|
||||
@echo "------------------------------------------------------------------"
|
||||
@echo "Timestamp"
|
||||
@echo "------------------------------------------------------------------"
|
||||
@docker exec -t -i $(PROJECT_ID)_imposm_1 cat /home/settings/timestamp.txt
|
||||
|
|
|
@ -219,7 +219,7 @@ while True:
|
|||
database_timestamp = diff.split('.')[0].split('->-')[1]
|
||||
file_path = join(default['SETTINGS'], 'timestamp.txt')
|
||||
timestamp_file = open(file_path, 'w')
|
||||
timestamp_file.write(database_timestamp)
|
||||
timestamp_file.write('%s\n' % database_timestamp)
|
||||
timestamp_file.close()
|
||||
|
||||
print 'Import diff successful : %s' % diff
|
||||
|
|
Ładowanie…
Reference in New Issue