增加用户管理
This commit is contained in:
40
compose.yaml
40
compose.yaml
@@ -5,7 +5,14 @@ services:
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- REDIS_ADDR=redis:6379
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
- DB_USER=postgres
|
||||
- DB_PASSWORD=postgres
|
||||
- DB_NAME=doudizhu
|
||||
depends_on:
|
||||
flyway:
|
||||
condition: service_completed_successfully
|
||||
redis:
|
||||
condition: service_healthy
|
||||
|
||||
@@ -38,3 +45,36 @@ services:
|
||||
retries: 5
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
- POSTGRES_DB=doudizhu
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d doudizhu"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
flyway:
|
||||
image: flyway/flyway:10
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./flyway/migrations:/flyway/sql:ro
|
||||
command: >
|
||||
-url=jdbc:postgresql://postgres:5432/doudizhu
|
||||
-user=postgres
|
||||
-password=postgres
|
||||
-connectRetries=10
|
||||
migrate
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user