专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

pcic/pdp Docker 镜像 - 轩辕镜像

pdp
pcic/pdp
自动构建
pcic
Docker build for the PCIC Data Portal (pdp).
0 次下载
🚀 生产环境还在裸拉官方镜像?一次故障=一次通宵
镜像简介版本下载
🚀 生产环境还在裸拉官方镜像?一次故障=一次通宵

pdp - PCIC Data Portal

The PCIC Data Portal contains the frontend code required for the PCIC Data Portal as well as WSGI callables to deploy the entire application within a WSGI container.

The following guide assumes an ubuntu/debian based system.

Dependencies

The pdp requires that pip and tox be installed.

bash
sudo apt-get install python-pip python-dev build-essential
sudo pip install tox ## or pip install tox --user

Some of the required python libraries have system-level dependencies.

bash
sudo apt-get install libhdf5-dev libnetcdf-dev libgdal-dev

And GDAL doesn't properly source it's own lib paths when installing the python package:

bash
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal

Installation

Development

With the prerequisites, creating a development environment should be as simple as:

bash
git clone [***]
cd pdp
tox -e devenv

It could take 5-30 minutes since tox will not use system packages and needs to build any package which requires it.

Production

It is best practice to maintain a consistent virtual environment for production.

bash
git clone [***]
cd pdp
virtualenv pyenv

The pdp will run in any WSGI container. This guide uses gunicorn.

bash
pyenv/bin/pip install -i [***] -r requirements.txt -r data_format_requirements.txt -r test_requirements.txt -r deploy_requirements.txt

Install and build the docs. Building the docs requires the package to be installed, then installed again after the docs are built.

bash
pyenv/bin/python setup.py install
pyenv/bin/python setup.py build_sphinx
pyenv/bin/python setup.py install

Configuration

Configuration of the PDP is accomplished through a set of environment variables. A sample environment file is stored in pdp/config.env. This environment file can be sourced in before you run the pdp, included in a Docker deployment or used in any other flexible way.

bash
source pdp/config.env
export $(grep -v '^#' pdp/config.env | cut -d= -f1)
Config Items

app_root

Root location where data portal will be exposed. This location will need to be proxied to whatever port the server will be running on.

data_root

Root location of backend data server. Probably <app_root>/data. If you are running in production, this location will need to be proxied to whatever port the data server will be running on. When running a development server, this is redirected internally.

dsn

Raster metadata database url of the form dialect[+driver]://username:password@host:port/database. Password must either be supplied or available in the user's ~/.pgpass file.

pcds_dsn

PCDS database URL of the form dialect[+driver]://username:password@host:port/database. Password must either be supplied or available in the user's ~/.pgpass file.

js_min

Determine's use of javascript bundling/minification.

geoserver_url

PCDS Geoserver URL

ncwms_url

Raster portal ncWMS URL

tilecache_url

Tileserver URLs (space separated list) for base maps

use_analytics

Enable or disable Google Analytics reporting

analytics

Google Analytics ID

Tests

When correctly configured, all the tests should now pass.

bash
pyenv/bin/py.test -vv --tb=short tests

Deploying

Development

Provided you installed everything with tox, you should be able to run a development server with

bash
devenv/bin/python scripts/rast_serve -p <port> [-t]
Production

A production install should be run in a production ready WSGI container with proper process monitoring. We use gunicorn as the WSGI container, Supervisord for process monitoring, and Apache as a reverse proxy.

In production, the frontend and backend are ran in seperate WSGI containers. This is because the front end serves short, non-blocking requests, whereas the back end serves fewer long, process blocking requests.

Gunicorn

Running in gunicorn can be tested with a command similar to the following:

bash
pyenv/bin/gunicorn -b 0.0.0.0:<port1> pdp.wsgi:frontend
pyenv/bin/gunicorn -b 0.0.0.0:<port2> pdp.wsgi:backend
Supervisord

Note: this is only an example process monitoring setup. Details can and will be different depending on your particular deployment stragety

Set up the Supervisord config file using

bash
pyenv/bin/echo_supervisord_conf > /install/location/supervisord.conf

In order to run Supervisord, the config file must have a [supervisord] section. Here's a sample section:

ini
[supervisord]
logfile=/install/location/etc/<supervisord_logfile>      ; (main log file;default $CWD/supervisord.log)
loglevel=info     ; (log level;default info; others: debug,warn,trace)
nodaemon=true     ; (start in foreground if true; useful for debugging)

Supervisorctl is a command line utility that lets you see the status and output of processes and start, stop and restart them. The following will set up supervisorctl using a unix socket file, but it is also possible to monitor processes using a web interface if you wish to do so.

ini
[unix_http_server]
file = /tmp/supervisord.sock

[supervisorctl]
serverurl = unix:///tmp/supervisord.sock

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

Front end config

ini
[program:pdp_frontend-v.v.v]
command=/install/location/pyenv/bin/gunicorn -b 0.0.0.0:<port> --access-logfile=<access_logfile> --error-logfile=<error_logfile> pdp.wsgi:frontend
directory=/install/location/
user=www-data
environment=OPTION0="",OPTION2=""...
autostart=true
autorestart=true
redirect_stderr=True
killasgroup=True

Back end config

ini
[program:pdp_backend-v.v.v]
command=/install/location/pyenv/bin/gunicorn -b 0.0.0.0:<port> --workers 10 --worker-class gevent -t 3600 --access-logfile=<access_logfile> --error-logfile=<error_logfile> pdp.wsgi:backend
directory=/install/location/
user=www-data
environment=OPTION0="",OPTION2=""...
autostart=true
autorestart=true
redirect_stderr=True
killasgroup=True

To make starting/stop easier, add a group to supervisord.conf

ini
[group:v.v.v]
programs=pdp_frontend-v.v.v,pdp_backend-v.v.v

Once the config file has been set up, start the processes with the following command:

bash
pyenv/bin/supervisord -c path/to/supervisord.conf

After invoking Supervisord, use supervisorctl to monitor and update the running processes

bash
pyenv/bin/supervisorctl

When upgrading, it's easiest to simply copy the existing config and update the paths/version number.

IMPORTANT: When adding a new version, make sure to set the old version autostart and autorestart to false.

Using supervisorctl, you should then be able to reread the new config, update the old version config (so it stops, picks up new autostart/autorestart=false), and update the new version.

If there are any errors, they can be found in the supervisord_logfile. Errors starting gunicorn can be found in the error_logfile.

查看更多 pdp 相关镜像 →
pcic/climate-explorer-backend logo
pcic/climate-explorer-backend
pcic
PCIC Climate Explorer Backend是气候探索器的后端服务,基于Flask框架构建,提供气候数据API,支持数据库交互与Docker部署,便于开发、测试和多环境搭建。
50K+ pulls
上次更新:7 个月前
pcic/climate-explorer-frontend logo
pcic/climate-explorer-frontend
pcic
PCIC Climate Explorer的前端界面,基于Node.js、React.js、Webpack等技术构建,用于气候数据的可视化与探索,支持通过环境变量配置连接后端服务及地图图层。
50K+ pulls
上次更新:4 个月前
pcic/geospatial-python logo
pcic/geospatial-python
pcic
基于Ubuntu的Docker镜像,包含用于处理地理空间netCDF数据的Python包及辅助工具,适用于作为地理空间Python Web应用的基础镜像。
10K+ pulls
上次更新:7 个月前
pcic/plan2adapt-v2-frontend logo
pcic/plan2adapt-v2-frontend
pcic
暂无描述
10K+ pulls
上次更新:5 个月前

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
pcic/pdp
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.