init: initial Django LMS backend
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: postgres-db
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_DB: my_db
|
||||
POSTGRES_USER: user
|
||||
POSTGRES_PASSWORD: password # รหัสผ่านสำหรับช่วงพัฒนาเท่านั้น
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
# Healthcheck เพื่อให้ backend รอจนกว่า DB จะพร้อม
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U user -d my_db"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
minio_data:
|
||||
Reference in New Issue
Block a user