Skip to content

Commit f980a46

Browse files
authored
Merge pull request #659 from OpenHistoricalMap/staging
Prevent osm-community-index KeyError to display better logs for web containers
2 parents 0c72652 + 81451ed commit f980a46

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ images/tiler-server/vtiles_languages.geojson
2828

2929
!hetzner/*/.*.sample
3030

31-
hetzner/*/.envs.*.production
31+
hetzner/*/.envs.*.production
32+
.vscode

images/web/start.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ EOF
3030
echo "S3 storage configuration set successfully."
3131
fi
3232

33+
3334
#### Initializing an empty $workdir/config/settings.local.yml file, typically used for development settings
3435
echo "" > $workdir/config/settings.local.yml
3536

37+
#### Fix translation files: replace {مجتمع} with {community} to prevent KeyError
38+
find "$workdir/node_modules/osm-community-index/i18n" -name "*.yaml" -type f -exec sed -i 's/{مجتمع}/{community}/g' {} \;
39+
3640
#### Setting up server_url and server_protocol
3741
sed -i -e 's/^server_protocol: ".*"/server_protocol: "'$SERVER_PROTOCOL'"/g' $workdir/config/settings.yml
3842
sed -i -e 's/^server_url: ".*"/server_url: "'$SERVER_URL'"/g' $workdir/config/settings.yml
@@ -173,8 +177,8 @@ setup_production() {
173177
fi
174178

175179
echo "Logging and tailing logs..."
176-
# log_and_tail /var/www/log/production.log
177-
# log_and_tail /var/www/log/jobs_work.log
180+
log_and_tail /var/www/log/production.log
181+
log_and_tail /var/www/log/jobs_work.log
178182
log_and_tail /var/log/apache2/error.log
179183
log_and_tail /var/log/apache2/access.log
180184

0 commit comments

Comments
 (0)