Files
oss-scripts/nocobase/docker-compose.yml
2025-12-22 17:55:01 +08:00

53 lines
1.5 KiB
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.
networks:
nocobase:
driver: bridge
services:
app:
# Latest为稳定版Beta为测试版Alpha为开发版
image: registry.cn-shanghai.aliyuncs.com/nocobase/nocobase:latest-full
restart: always
networks:
- nocobase
depends_on:
- mariadb
environment:
# 应用的密钥,用于生成用户 token 等
# 如果 APP_KEY 修改了,旧的 token 也会随之失效
# 可以是任意随机字符串,并确保不对外泄露
- APP_KEY=your-secret-key
# 数据库类型,支持 postgres, mysql, mariadb
- DB_DIALECT=mariadb
# 数据库主机,可以替换为已有的数据库服务器 IP
- DB_HOST=mariadb
# Database port
- DB_PORT=3306
# 数据库名
- DB_DATABASE=nocobase
# 数据库用户
- DB_USER=root
# 数据库密码
- DB_PASSWORD=ggo4fnk1748e
# 数据库表名、字段名是否转为 snake case 风格
- DB_UNDERSCORED=true
# 时区
- TZ=Asia/Shanghai
volumes:
- ./storage:/app/nocobase/storage
ports:
- '13000:80'
# init: true
# 如果使用已有数据库服务,可以不启动 mariadb
mariadb:
image: registry.cn-shanghai.aliyuncs.com/nocobase/mariadb:11
environment:
MYSQL_DATABASE: nocobase
MYSQL_USER: nocobase
MYSQL_PASSWORD: m3d1c6eea8uw
MYSQL_ROOT_PASSWORD: ggo4fnk1748e
restart: always
volumes:
- ./storage/db/mariadb:/var/lib/mysql
networks:
- nocobase