mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-04-02 23:09:26 +02:00
fix(OSM): increase memory for import
This commit is contained in:
parent
b29dd99fd7
commit
3dbcd7a714
|
|
@ -295,7 +295,7 @@ export class DockerService {
|
||||||
* Largely follows the install instructions here: https://github.com/Overv/openstreetmap-tile-server/blob/master/README.md
|
* Largely follows the install instructions here: https://github.com/Overv/openstreetmap-tile-server/blob/master/README.md
|
||||||
*/
|
*/
|
||||||
private async _runPreinstallActions__OpenStreetMap(image: string, containerConfig: any): Promise<void> {
|
private async _runPreinstallActions__OpenStreetMap(image: string, containerConfig: any): Promise<void> {
|
||||||
const OSM_PBF_URL = 'https://download.geofabrik.de/north-america-latest.osm.pbf'; // Download North America latest for initial import
|
const OSM_PBF_URL = 'https://download.geofabrik.de/north-america/us-pacific-latest.osm.pbf'; // Download US Pacific sub-region for initial import
|
||||||
const IMPORT_FILE = 'region.osm.pbf';
|
const IMPORT_FILE = 'region.osm.pbf';
|
||||||
const PATH = `${DockerService.NOMAD_STORAGE_DIR}/osm/${IMPORT_FILE}`;
|
const PATH = `${DockerService.NOMAD_STORAGE_DIR}/osm/${IMPORT_FILE}`;
|
||||||
const IMPORT_BIND = `${PATH}:/data/${IMPORT_FILE}:rw`;
|
const IMPORT_BIND = `${PATH}:/data/${IMPORT_FILE}:rw`;
|
||||||
|
|
@ -336,6 +336,8 @@ export class DockerService {
|
||||||
Object.assign(configWithImportBind, {
|
Object.assign(configWithImportBind, {
|
||||||
RestartPolicy: { Name: 'no' },
|
RestartPolicy: { Name: 'no' },
|
||||||
Binds: [...(containerConfig.HostConfig?.Binds || []), IMPORT_BIND],
|
Binds: [...(containerConfig.HostConfig?.Binds || []), IMPORT_BIND],
|
||||||
|
Memory: 4 * 1024 * 1024 * 1024, // 4GB
|
||||||
|
MemorySwap: -1
|
||||||
});
|
});
|
||||||
|
|
||||||
this._broadcast(DockerService.OPENSTREETMAP_IMPORT_SERVICE_NAME, 'importing', `Processing initial import of OSM data. This may take some time...`);
|
this._broadcast(DockerService.OPENSTREETMAP_IMPORT_SERVICE_NAME, 'importing', `Processing initial import of OSM data. This may take some time...`);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user