Files
2026-06-25 17:41:06 +08:00

38 lines
1.2 KiB
YAML

services:
fastapi-admin:
build:
context: ./
dockerfile: ./Dockerfile
args:
# 可以在这里添加构建参数,例如版本号等
APP_VERSION: 1.1
tags: fastapi:1.1
container_name: weixin-admin
restart: always
ports:
- "8091:80"
volumes:
- "./app:/opt/backend-server/app" # 项目代码
- "./logs/server:/opt/backend-server/app/logs" # 日志目录
- "./logs/nginx:/var/log/nginx" # nginx日志目录
- "./cache:/opt/backend-server/cache_dir" # 缓存目录
extra_hosts:
- "host.docker.internal:host-gateway"
working_dir: /opt/backend-server
# stdin_open: true # equivalent to -i
# tty: true # equivalent to -t
environment:
- APP_ENV=prod
- CACHE_DIR=/opt/backend-server/cache_dir
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8
# 👇 数据库或其他配置按需添加(如果项目需要)
- DB_CONNECTION=mysql
- DB_HOST=host.docker.internal
- DB_PORT=3306
- DB_NAME=crm_info
- DB_USER=root
- DB_PASSWORD=^tY%ESo8TfcjSeT%
- REDIS_URL=redis://:Zmht%40170901%21%40%23%24.%3B@host.docker.internal:6379/2