-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (39 loc) · 1.06 KB
/
docker-compose.yml
File metadata and controls
42 lines (39 loc) · 1.06 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
services:
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: magicpush-server
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- server-data:/app/data # 数据库文件
- server-logs:/app/logs # 日志文件
environment:
- NODE_ENV=production # 可选项,默认production
- JWT_ACCESS_EXPIRES_IN=15m # 可选项,默认15分钟
- JWT_REFRESH_EXPIRES_IN=7d # 可选项,默认7天
- DB_PATH=./data/push_service.db # 可选项,默认./data/push_service.db
- LOG_LEVEL=info # 可选项,默认info
- TZ=Asia/Shanghai # 可选项,默认东八区(北京时间),可设置为其他时区如 UTC, America/New_York 等
networks:
- magicpush-network
web:
build:
context: ./web
dockerfile: Dockerfile
container_name: magicpush-web
restart: unless-stopped
ports:
- "80:80"
depends_on:
- server
networks:
- magicpush-network
networks:
magicpush-network:
driver: bridge
volumes:
server-data:
server-logs: