add workflow
Some checks failed
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Failing after 9s
Build and Deploy Frontend Learner / Deploy Frontend Learner to Server (push) Has been skipped
Build and Deploy Frontend Management / Build Frontend Management Docker Image (push) Failing after 9s
Build and Deploy Backend / Build Backend Docker Image (push) Failing after 9s
Build and Deploy Frontend Management / Deploy Frontend Management to Server (push) Has been skipped
Build and Deploy Backend / Deploy Backend to Server (push) Has been skipped

This commit is contained in:
JakkrapartXD 2026-02-09 16:56:12 +07:00
parent 15794fab16
commit 4ec1d34297
6 changed files with 364 additions and 0 deletions

69
compose.infa.yaml Normal file
View file

@ -0,0 +1,69 @@
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