70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
|
|
services:
|
||
|
|
# PostgreSQL Database
|
||
|
|
postgres:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
container_name: elearning-postgres
|
||
|
|
restart: unless-stopped
|
||
|
|
ports:
|
||
|
|
- "5432:5432"
|
||
|
|
volumes:
|
||
|
|
- postgres-data:/var/lib/postgresql/data
|
||
|
|
environment:
|
||
|
|
- POSTGRES_DB=elearning_dev
|
||
|
|
- POSTGRES_PASSWORD=12345678
|
||
|
|
- TZ=Asia/Bangkok
|
||
|
|
healthcheck:
|
||
|
|
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|
||
|
|
networks:
|
||
|
|
- elearning-shared
|
||
|
|
|
||
|
|
# MinIO - S3 Compatible Storage
|
||
|
|
minio:
|
||
|
|
image: minio/minio:latest
|
||
|
|
container_name: elearning-minio
|
||
|
|
deploy:
|
||
|
|
resources:
|
||
|
|
limits:
|
||
|
|
memory: 1G
|
||
|
|
restart: unless-stopped
|
||
|
|
command: server /data --console-address ":9001"
|
||
|
|
ports:
|
||
|
|
- "9000:9000"
|
||
|
|
- "9001:9001"
|
||
|
|
volumes:
|
||
|
|
- minio-data:/data
|
||
|
|
environment:
|
||
|
|
- TZ=Asia/Bangkok
|
||
|
|
- MINIO_ROOT_USER=admin
|
||
|
|
- MINIO_ROOT_PASSWORD=12345678
|
||
|
|
healthcheck:
|
||
|
|
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 20s
|
||
|
|
retries: 3
|
||
|
|
networks:
|
||
|
|
- elearning-shared
|
||
|
|
|
||
|
|
# Mailhog - Email Testing
|
||
|
|
mailhog:
|
||
|
|
image: mailhog/mailhog:latest
|
||
|
|
container_name: elearning-mailhog
|
||
|
|
restart: unless-stopped
|
||
|
|
ports:
|
||
|
|
- "1025:1025"
|
||
|
|
- "8025:8025"
|
||
|
|
environment:
|
||
|
|
- TZ=Asia/Bangkok
|
||
|
|
networks:
|
||
|
|
- elearning-shared
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
postgres-data:
|
||
|
|
minio-data:
|
||
|
|
|
||
|
|
networks:
|
||
|
|
elearning-shared:
|
||
|
|
external: true
|