mirror of
https://github.com/ctwj/urldb.git
synced 2025-11-25 03:15:04 +08:00
38 lines
733 B
YAML
38 lines
733 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
environment:
|
|
POSTGRES_DB: res_db
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
app:
|
|
build: .
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_USER: postgres
|
|
DB_PASSWORD: password
|
|
DB_NAME: res_db
|
|
PORT: 8080
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./uploads:/root/uploads
|
|
|
|
volumes:
|
|
postgres_data: |