feat: Implement local backend development setup with Docker Compose, introduce .dockerignore, and remove dev dependency pruning from the Dockerfile.
All checks were successful
Build and Deploy Backend / Build Backend Docker Image (push) Successful in 32s
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 34s
Build and Deploy Backend / Deploy E-learning Backend to Dev Server (push) Successful in 3s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 2s
Build and Deploy Backend / Notify Deployment Status (push) Successful in 2s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 2s

This commit is contained in:
JakkrapartXD 2026-02-10 14:26:09 +07:00
parent 0691ca40cd
commit d2e78dcfbb
3 changed files with 56 additions and 3 deletions

View file

@ -63,6 +63,44 @@ services:
networks:
- elearning-network
# Backend API (Local Build)
backend:
build:
context: .
dockerfile: Dockerfile
container_name: elearning-backend-local
restart: unless-stopped
ports:
- "4000:4000"
env_file:
- .env
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://postgres:12345678@postgres:5432/elearning_dev
- S3_ENDPOINT=http://minio:9000
- S3_ACCESS_KEY=admin
- S3_SECRET_KEY=12345678
- SMTP_HOST=mailhog
- SMTP_PORT=1025
volumes:
- ./src:/app/src
- ./prisma:/app/prisma
networks:
- elearning-network
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
mailhog:
condition: service_started
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4000/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Adminer - Database Management UI
adminer:
image: adminer:latest