Skip to content

Commit 8f1e1c3

Browse files
committed
Update script
1 parent bf923f4 commit 8f1e1c3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

images/taginfo/start.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
WORKDIR=/usr/src/app
33
DATADIR=/usr/src/app/data
4-
DATADOWNLOAD=/usr/src/app/osm
4+
DATADOWNLOAD=/osm/planet/var
55
mkdir -p $DATADIR/
66
mkdir -p $DATADOWNLOAD/
77
mkdir -p $DATADIR/update/log/
@@ -43,10 +43,11 @@ process_data() {
4343
# # wiki/update.sh $DATADIR
4444
# # wikidata/update.sh $DATADIR
4545
chronology/update.sh $DATADIR
46-
mv $DATADIR/taginfo-*.db $DATADIR/
47-
mv $DATADIR/*/taginfo-*.db $DATADIR/
46+
./update_all.sh $DATADIR
47+
mv $DATADIR/*.db $DATADIR/
48+
mv $DATADIR/*/*.db $DATADIR/
49+
4850
# if BUCKET_NAME is set upload data
49-
5051
if ! aws s3 ls "s3://$BUCKET_NAME/$ENVIRONMENT" 2>&1 | grep -q 'An error occurred'; then
5152
aws s3 sync $DATADIR/ s3://$AWS_S3_BUCKET/$ENVIRONMENT/ --exclude "*" --include "*.db"
5253
fi
@@ -63,15 +64,14 @@ compress_files() {
6364
download_db_files() {
6465
if ! aws s3 ls "s3://$AWS_S3_BUCKET/$ENVIRONMENT" 2>&1 | grep -q 'An error occurred'; then
6566
aws s3 sync "s3://$AWS_S3_BUCKET/$ENVIRONMENT/" "$DATADIR/"
67+
compress_files
6668
fi
67-
compress_files
6869
}
6970

70-
7171
sync_latest_db_version() {
7272
while true; do
73-
download_db_files
7473
sleep "$INTERVAL_DOWNLOAD_DATA"
74+
download_db_files
7575
done
7676
}
7777

osm-seed/templates/taginfo/taginfo-deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
- /bin/sh
3030
- -c
3131
- |
32-
/usr/src/app/start.sh web
32+
sleep 36000 && /usr/src/app/start.sh web
3333
ports:
3434
- name: http
3535
containerPort: 80
@@ -38,8 +38,8 @@ spec:
3838
httpGet:
3939
path: /
4040
port: 80
41-
initialDelaySeconds: 60
42-
timeoutSeconds: 30
41+
initialDelaySeconds: 120
42+
timeoutSeconds: 60
4343
{{- if .Values.taginfo.resources.enabled }}
4444
resources:
4545
requests:

0 commit comments

Comments
 (0)