08ea5fbe98
添加用户管理视图、API和状态管理文件
92 lines
2.1 KiB
YAML
92 lines
2.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: postgres
|
|
environment:
|
|
POSTGRES_DB: everything_is_suitable
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres123}
|
|
TZ: Asia/Shanghai
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build:
|
|
context: ./everything-is-suitable-api
|
|
dockerfile: Dockerfile
|
|
container_name: api
|
|
environment:
|
|
SPRING_PROFILES_ACTIVE: production
|
|
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/everything_is_suitable
|
|
SPRING_DATASOURCE_USERNAME: postgres
|
|
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD:-postgres123}
|
|
TZ: Asia/Shanghai
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- app-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
admin:
|
|
build:
|
|
context: ./everything-is-suitable-admin
|
|
dockerfile: Dockerfile
|
|
container_name: admin
|
|
ports:
|
|
- "80:80"
|
|
depends_on:
|
|
- api
|
|
networks:
|
|
- app-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
uniapp:
|
|
build:
|
|
context: ./everything-is-suitable-uniapp
|
|
dockerfile: Dockerfile
|
|
container_name: uniapp
|
|
ports:
|
|
- "8081:80"
|
|
depends_on:
|
|
- api
|
|
networks:
|
|
- app-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|