33 lines
1.2 KiB
YAML
33 lines
1.2 KiB
YAML
# 复制为 docker-compose.override.yml 后按需修改;该文件不入库。
|
||
#
|
||
# cp docker-compose.override.example.yml docker-compose.override.yml
|
||
#
|
||
# docker-deploy.sh 与 docker compose 会自动带上这个覆盖文件。
|
||
|
||
services:
|
||
api:
|
||
# host.docker.internal 已在 docker-compose.yml 里默认配置;
|
||
# 数据库在宿主机时,把 .env 的 DATABASE_URL / REDIS_URL 改成 host.docker.internal 即可。
|
||
build:
|
||
args:
|
||
# 基础镜像:可改成服务器本地已有镜像或私有仓库地址
|
||
PYTHON_IMAGE: python:3.12-slim
|
||
# 国内依赖源
|
||
APT_MIRROR: mirrors.tuna.tsinghua.edu.cn
|
||
PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple
|
||
volumes:
|
||
# 宿主机资源目录 -> 容器 /app/data
|
||
- /srv/nex_buddy/data:/app/data
|
||
|
||
web:
|
||
build:
|
||
args:
|
||
NODE_IMAGE: node:22-alpine
|
||
NGINX_IMAGE: nginx:latest
|
||
NPM_REGISTRY: https://registry.npmmirror.com
|
||
# 对外端口默认 80。改 docker-compose.yml 的 web.ports,
|
||
# 或运行时指定 HTTP_PORT=8080(见 docker/README.md)。
|
||
|
||
# 使用 --full 时,PostgreSQL 口令通过 shell 环境变量传入更合适:
|
||
# POSTGRES_PASSWORD='强口令' ./scripts/docker-deploy.sh --full --init
|