-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: '3'
services:
backend:
image: eggsunsky/doctranslator:latest
container_name: backend-container
ports:
- "5000:5000"
volumes:
- ./backend/db:/app/db
environment:
- FLASK_ENV=production
- SECRET_KEY=your-secret-key
# 开发环境数据库(SQLite)
# - DEV_DATABASE_URL=sqlite:////app/db/dev.db
# 生产环境数据库 使用mysql
- SQLALCHEMY_DATABASE_URI=mysql+pymysql://user:pwd@localhost/xxxx
- PROD_DATABASE_URL=mysql+pymysql://user:pwd@localhost/xxxx
# JWT 配置
- JWT_SECRET_KEY=sxxxxxx
- JWT_ACCESS_TOKEN_EXPIRES=172800
# 邮箱配置
- MAIL_SERVER=smtp.qq.com
- MAIL_PORT=587
- MAIL_USE_TLS=true
- MAIL_USERNAME=xxxx@qq.com
- MAIL_PASSWORD=xxxxxx
- MAIL_DEFAULT_SENDER=ixxxx@qq.com
- ALLOWED_EMAIL_DOMAINS=qq.com,163.com,126.com
# 跨域 允许的域名
- ALLOWED_DOMAINS=*
networks:
- my-network
# ... existing code ...
nginx:
image: nginx:stable-alpine
container_name: nginx-container
ports:
- "1475:80"
- "8081:8081"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./frontend/dist:/usr/share/nginx/html/frontend
- ./admin/dist:/usr/share/nginx/html/admin
depends_on:
- backend
networks:
- my-network
networks:
my-network:
driver: bridge