forked from wangziqi/ruoyi-vue-pro
37 lines
875 B
YAML
37 lines
875 B
YAML
name: gongxue-local
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
ports:
|
|
- "127.0.0.1::5432"
|
|
environment:
|
|
POSTGRES_DB: ruoyi-vue-pro
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: 123456
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
- ./sql/postgresql/ruoyi-vue-pro.sql:/docker-entrypoint-initdb.d/000-platform.sql:ro
|
|
- ./script/docker/init-local-roles.sql:/docker-entrypoint-initdb.d/010-local-roles.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d ruoyi-vue-pro"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 30
|
|
|
|
redis:
|
|
image: redis:6-alpine
|
|
ports:
|
|
- "127.0.0.1::6379"
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 30
|
|
|
|
volumes:
|
|
postgres-data:
|
|
redis-data:
|