
, but will still be served until a new tile has been rendered, or deleted from the cache (DELETEFROM), so nothing will be served until a new tile has been rendered.
The example tile expiration values below are the default values.
docker run \ -p 8080:80 \ -e REPLICATION_URL=https://planet.openstreetmap.org/replication/minute/ \ -e MAX_INTERVAL_SECONDS=60 \ -e UPDATES=enabled \ -e EXPIRY_MINZOOM=13 \ -e EXPIRY_TOUCHFROM=13 \ -e EXPIRY_DELETEFROM=19 \ -e EXPIRY_MAXZOOM=20 \ -v osm-data:/data/database/ \ -v osm-tiles:/data/tiles/ \ -d overv/openstreetmap-tile-server \ run
To enable the Access-Control-Allow-Origin header to be able to retrieve tiles from other domains, simply set the ALLOW_CORS variable to enabled:
docker run \ -p 8080:80 \ -v osm-data:/data/database/ \ -e ALLOW_CORS=enabled \ -d overv/openstreetmap-tile-server \ run
To connect to the PostgreSQL database inside the container, make sure to expose port 5432:
docker run \ -p 8080:80 \ -p 5432:5432 \ -v osm-data:/data/database/ \ -d overv/openstreetmap-tile-server \ run
Use the user renderer and the database gis to connect.
psql -h localhost -U renderer gis
The default password is renderer, but it can be changed using the PGPASSWORD environment variable:
docker run \ -p 8080:80 \ -p 5432:5432 \ -e PGPASSWORD=secret \ -v osm-data:/data/database/ \ -d overv/openstreetmap-tile-server \ run
Details for update procedure and invoked scripts can be found here link.
The import and tile serving processes use 4 threads by default, but this number can be changed by setting the THREADS environment variable. For example:
docker run \ -p 8080:80 \ -e THREADS=24 \ -v osm-data:/data/database/ \ -d overv/openstreetmap-tile-server \ run
The import and tile serving processes use 800 MB RAM cache by default, but this number can be changed by option -C. For example:
docker run \ -p 8080:80 \ -e "OSM2PGSQL_EXTRA_ARGS=-C 4096" \ -v osm-data:/data/database/ \ -d overv/openstreetmap-tile-server \ run
The database use the autovacuum feature by default. This behavior can be changed with AUTOVACUUM environment variable. For example:
docker run \ -p 8080:80 \ -e AUTOVACUUM=off \ -v osm-data:/data/database/ \ -d overv/openstreetmap-tile-server \ run
If you are planning to import the entire planet or you are running into memory errors then you may want to enable the --flat-nodes option for osm2pgsql. You can then use it during the import process as follows:
docker run \ -v /absolute/path/to/luxembourg.osm.pbf:/data/region.osm.pbf \ -v osm-data:/data/database/ \ -e "FLAT_NODES=enabled" \ overv/openstreetmap-tile-server \ import
Warning: enabling FLAT_NOTES together with UPDATES only works for entire planet imports (without a .poly file). Otherwise this will break the automatic update script. This is because trimming the differential updates to the specific regions currently isn't supported when using flat nodes.
You can find an example of the import performance to expect with this image on the OpenStreetMap wiki.
If you encounter such entries in the log, it will mean that the default shared memory limit (64 MB) is too low for the container and it should be raised:
renderd[121]: ERROR: failed to render TILE default 2 0-3 0-3 renderd[121]: reason: Postgis Plugin: ERROR: could not resize shared memory segment "/PostgreSQL.790133961" to 12615680 bytes: ### No space left on device
To raise it use --shm-size parameter. For example:
docker run \ -p 8080:80 \ -v osm-data:/data/database/ \ --shm-size="192m" \ -d overv/openstreetmap-tile-server \ run
For too high values you may notice excessive CPU load and memory usage. It might be that you will have to experimentally find the best values for yourself.
You may be running into problems with memory usage during the import. Have a look at the "Flat nodes" section in this README.
Copyright 2019 Alexander Overvoorde Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务