-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (42 loc) · 1.04 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (42 loc) · 1.04 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
version: '3.8'
services:
# Python 版本授权服务器(含 Web 管理面板)
ycp-auth-python:
build:
context: .
dockerfile: server_python/Dockerfile
container_name: ycp-auth-python
ports:
- "13337:13337"
volumes:
- ./data/ycp_auth.db:/app/ycp_auth.db
restart: unless-stopped
environment:
- FLASK_ENV=production
# Go 版本授权服务器(高性能,含 Web 管理面板)
ycp-auth-go:
build:
context: .
dockerfile: server_go/Dockerfile
container_name: ycp-auth-go
ports:
- "13338:13337" # 使用不同端口避免冲突
volumes:
- ./data/ycp_auth_go.db:/app/ycp_auth.db
restart: unless-stopped
# Nginx 反向代理(可选)
nginx:
image: nginx:alpine
container_name: ycp-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
depends_on:
- ycp-auth-python
restart: unless-stopped
volumes:
data:
driver: local