-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (96 loc) · 2.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
101 lines (96 loc) · 2.64 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
services:
mysql:
profiles: ["mysql"]
image: mysql:8.4
container_name: contractsys-mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: contractsys
MYSQL_USER: contractsys
MYSQL_PASSWORD: contractsys
TZ: Asia/Shanghai
ports:
- "3307:3306"
volumes:
- contractsys-mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -u$$MYSQL_USER -p$$MYSQL_PASSWORD --silent"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
postgres:
image: postgres:17-alpine
container_name: contractsys-postgres
environment:
POSTGRES_DB: contractsys
POSTGRES_USER: contractsys
POSTGRES_PASSWORD: contractsys
TZ: Asia/Shanghai
ports:
- "5432:5432"
volumes:
- contractsys-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s
redis:
image: redis:8-alpine
container_name: contractsys-redis
ports:
- "6379:6379"
volumes:
- contractsys-redis-data:/data
command: ["redis-server", "--appendonly", "yes"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 10
backend:
build:
context: ./backend
image: contractsys-backend:local
container_name: contractsys-backend
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: postgres,redis
SPRING_JPA_HIBERNATE_DDL_AUTO: none
SPRING_JPA_PROPERTIES_HIBERNATE_HBM2DDL_AUTO: none
POSTGRES_URL: jdbc:postgresql://postgres:5432/contractsys
POSTGRES_USERNAME: contractsys
POSTGRES_PASSWORD: contractsys
REDIS_HOST: redis
REDIS_PORT: 6379
CORS_ALLOWED_ORIGINS: http://localhost:5173,http://127.0.0.1:5173
ADMIN_DEFAULT_PASSWORD: 123456
DEMO_DATA_ENABLED: ${DEMO_DATA_ENABLED:-false}
SPRINGDOC_API_DOCS_ENABLED: "true"
SPRINGDOC_SWAGGER_UI_ENABLED: "true"
JWT_SECRET: replace-with-at-least-32-bytes-secret-for-local-compose
TZ: Asia/Shanghai
ports:
- "18080:8080"
volumes:
- contractsys-uploads:/app/uploads
frontend:
build:
context: ./frontend
image: contractsys-frontend:local
container_name: contractsys-frontend
depends_on:
- backend
ports:
- "5173:80"
volumes:
contractsys-mysql-data:
contractsys-postgres-data:
contractsys-redis-data:
contractsys-uploads: