feat: Add initial Docker Compose configuration for the learner-ui service.

This commit is contained in:
supalerk-ar66 2026-02-05 15:23:54 +07:00
parent 7465af1cb9
commit 9a6b4e3e0d

View file

@ -1,21 +1,27 @@
services: services:
learner-ui: learner-ui:
build: . image: elearning-learner-ui:latest
build:
context: .
dockerfile: Dockerfile
container_name: elearning-learner-ui container_name: elearning-learner-ui
restart: unless-stopped restart: unless-stopped
ports: ports:
- "3000:3000" - "3000:3000"
environment: environment:
# URL ของ Backend API (Nuxt 3 จะใช้ NUXT_PUBLIC_ นำหน้า)
- NUXT_PUBLIC_API_BASE=${NUXT_PUBLIC_API_BASE:-http://192.168.1.137:4000/api} - NUXT_PUBLIC_API_BASE=${NUXT_PUBLIC_API_BASE:-http://192.168.1.137:4000/api}
# กรณีต้องการระบุ URL อื่นๆ เพิ่มเติม เช่น S3 (ถ้ามีการใช้ในอนาคต)
- NUXT_PUBLIC_S3_ENDPOINT=${NUXT_PUBLIC_S3_ENDPOINT:-http://192.168.1.137:9000} - NUXT_PUBLIC_S3_ENDPOINT=${NUXT_PUBLIC_S3_ENDPOINT:-http://192.168.1.137:9000}
security_opt: security_opt:
- apparmor=unconfined - apparmor=unconfined
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks: networks:
- elearning-network - elearning-network
networks: networks:
elearning-network: elearning-network:
external: true external: true