37 lines
752 B
YAML
37 lines
752 B
YAML
name: lanhu
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:17.7
|
|
environment:
|
|
POSTGRES_USER: ${DB_USERNAME}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_DB: ${DB_NAME}
|
|
ports:
|
|
- "${DB_PORT}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./scripts/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7.4
|
|
ports:
|
|
- "${REDIS_PORT}:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
restart: unless-stopped
|
|
|
|
postgres-migrate:
|
|
image: postgres:17
|
|
environment:
|
|
POSTGRES_USER: ${DB_USERNAME}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_DB: ${DB_NAME}
|
|
ports:
|
|
- "5433:5432"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|