36 lines
1010 B
YAML
36 lines
1010 B
YAML
services:
|
|
frontend_dev_image:
|
|
build:
|
|
context: /share/Container/dms/frontend
|
|
# context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: dev
|
|
args:
|
|
- NEXT_PUBLIC_API_BASE=https://lcbp3.np-dms.work
|
|
- NODE_ENV=development
|
|
image: dms-frontend:dev
|
|
command: ["true"]
|
|
|
|
frontend_prod_image:
|
|
build:
|
|
context: /share/Container/dms/frontend
|
|
# context: ./frontend
|
|
args:
|
|
- NEXT_PUBLIC_API_BASE=https://lcbp3.np-dms.work
|
|
- NODE_ENV=production
|
|
dockerfile: Dockerfile
|
|
target: prod
|
|
image: dms-frontend:prod
|
|
command: ["true"]
|
|
|
|
# docker compose -f docker-frontend-build.yml build --no-cache
|
|
# docker compose -f docker-frontend-build.yml build --no-cache 2>&1 | tee frontend_build.log
|
|
|
|
# สร้าง package-lock.json
|
|
# cd frontend
|
|
# docker run --rm -v "$PWD:/app" -w /app node:24-alpine npm install
|
|
|
|
# สำหรับ build บน local
|
|
# cd frontend
|
|
# docker build -t dms-frontend:dev --target dev .
|