
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这段话即可:
请先阅读并遵守:https://xuanyuan.cloud/agents.md
未读文档前不要生成 pull 命令或排错方案。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
An image running https://hub.docker.com/_/ubuntu/ Linux and https://github.com/spotweb/spotweb.
You need a seperate MySQL / MariaDB server. This can of course be a (linked) docker container but also a dedicated database server.
If you would like to use docker-compose, a short guide can be found below. Thanks to https://github.com/djongepier.
First create a database on your database server, and make sure the container has access to the database, then run a temporary container.
docker run -it --rm -p 80:80 \ -e TZ='Europe/Amsterdam' \ jgeusebroek/spotweb
Please NOTE that there is no database configuration here, this will enable the install process.
The run the Spotweb installer using the web interface: '[***] This will create the necessary database tables and users. Ignore the warning when it tries to save the configuration.
When you are done, exit the container (CTRL/CMD-c) and configure the permanent running container.
docker run --restart=always -d -p 80:80 \ --hostname=spotweb \ --name=spotweb \ -v <hostdir_where_config_will_persistently_be_stored>:/config \ -e 'TZ=Europe/Amsterdam' \ -e 'SPOTWEB_DB_TYPE=pdo_mysql' \ -e 'SPOTWEB_DB_HOST=<database_server_hostname>' \ -e 'SPOTWEB_DB_PORT=<database_port>' \ -e 'SPOTWEB_DB_NAME=spotweb' \ -e 'SPOTWEB_DB_USER=spotweb' \ -e 'SPOTWEB_DB_PASS=spotweb' \ jgeusebroek/spotweb
Please NOTE that the volume is optional. Only necessary when you have special configuration settings. The database port is also optional. If omitted it will use the standard port for MySQL / PostgreSQL.
You should now be able to reach the spotweb interface on port 80.
To enable automatic retrieval, you need to setup a cronjob on either the docker host or within the container.
Automatic retrieval of new spots on the docker host
To enable automatic retrieval, you need to setup a cronjob on the docker host.
*/15 * * * * docker exec spotweb su -l www-data -s /usr/bin/php /var/www/spotweb/retrieve.php >/dev/null 2>&1
This example will retrieve new spots every 15 minutes.
Automatic retrieval of new spots from within the container
To enable automatic retrieval from within the container, use the SPOTWEB_CRON_RETRIEVE variable to specify the cron timing for retrieval. For example as additional parameter to the docker run command:
-e 'SPOTWEB_CRON_RETRIEVE=*/15 * * * *'
The container will try to auto-update the database when a newer version is released.
An example docker-compose.yml is included. Create your base directory and edit the environment variables to suit your needs. After the initial run (docker-compose up -d) you will need to remove the <base_dir>/spotweb/dbsettings.inc.php because otherwise the install process won't proceed. Don't worry, your settings won't be lost.
After you deleted the file, point your browser to your install (ie. http://localhost:81/install.php) and follow the installation procedure.
It might give you an error saying it can't write the settings to file. You can ignore this.
When this all is finished, restart spotweb using docker-compose restart. You should now have a working spotweb installation. (please note the <base_dir>/spotweb/dbsettings.inc.php file will be automatically recreated during the restart).
| Variable | Function |
|---|---|
TZ | The timezone the server is running in. Defaults to Europe/Amsterdam. |
SPOTWEB_DB_TYPE | Database type. Use pdo_mysql for MySQL. |
SPOTWEB_DB_HOST | The database hostname / IP. |
SPOTWEB_DB_PORT | The database port. Optional. |
SPOTWEB_DB_NAME | The database used for spotweb. |
SPOTWEB_DB_USER | The database server username. |
SPOTWEB_DB_PASS | The database server password. |
SPOTWEB_CRON_RETRIEVE | Cron schedule for article retrieval. E.g. */15 * * * * for every fifteen minutes. |
SPOTWEB_CRON_CACHE_CHECK | Cron schedule for article cache sanity check. E.g. 10 */1 * * * for 10 minutes after every hour. |
WEBSERVER_PORT | Change the webserver port (for when you can't use port mapping with host network for example) |
MIT / BSD
Jeroen Geusebroek
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务