build frontend ใหม่ ผ่านทั้ง dev และ proc
This commit is contained in:
@@ -5,27 +5,30 @@ services:
|
||||
# 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 #added
|
||||
- NODE_ENV=production
|
||||
dockerfile: Dockerfile
|
||||
target: prod
|
||||
# environment:
|
||||
# - NEXT_PUBLIC_API_BASE=https://lcbp3.np-dms.work
|
||||
image: dms-frontend:prod
|
||||
command: ["true"]
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_BASE=https://lcbp3.np-dms.work
|
||||
- NODE_ENV=production
|
||||
|
||||
# docker compose -f docker-frontend-build.yml build --no-cache
|
||||
# **** สำหรับ build บน server เอา ## ออก *****
|
||||
|
||||
# สร้าง 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 .
|
||||
|
||||
Reference in New Issue
Block a user