Files

23 lines
972 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# lunar-server 容器编排(doc79 同机部署,通过 1Panel Compose 编排创建)
# 用法:1Panel → 容器 → Compose → 创建编排,粘贴本文件内容后部署。
# 前置:先在 /opt/lunar/production/.env 写入全部生产环境变量(模板见 PULL_DEPLOY.md)。
# 之后 CI 产物由 1Panel 计划任务触发的 deploy-watch.sh 自动替换
# /opt/lunar/production/current 并重启容器(container_name 必须保持 lunar-server
# deploy.sh 按此名称重启)。
services:
lunar-server:
image: golang:1.22-bookworm
container_name: lunar-server
working_dir: /app
volumes:
- /opt/lunar/production/current:/app
- /opt/lunar/production/data:/app/data
- /opt/lunar/production/.env:/app/.env
ports:
- "127.0.0.1:8081:8080" # 只监听本机,对外由 nginx 反代 lunar.neatcn.com
env_file:
- /opt/lunar/production/.env
restart: unless-stopped
command: /app/bin/server