feat: Add Dockerfile and docker-compose.yml for project containerization
This commit is contained in:
parent
f689894de5
commit
91330c03c2
2 changed files with 3 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# --- Build Stage ---
|
||||
FROM node:20-alpine AS build-stage
|
||||
FROM node:20-bullseye-slim AS build-stage
|
||||
|
||||
# กำหนดโฟลเดอร์ทำงานใน Container
|
||||
WORKDIR /app
|
||||
|
|
@ -17,7 +17,7 @@ COPY . .
|
|||
RUN npm run build
|
||||
|
||||
# --- Production Stage ---
|
||||
FROM node:20-alpine AS production-stage
|
||||
FROM node:20-bullseye-slim AS production-stage
|
||||
|
||||
# กำหนดโฟลเดอร์ทำงาน
|
||||
WORKDIR /app
|
||||
|
|
|
|||
|
|
@ -10,11 +10,10 @@ services:
|
|||
- 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}
|
||||
security_opt:
|
||||
- apparmor:unconfined
|
||||
networks:
|
||||
- elearning-network
|
||||
|
||||
networks:
|
||||
elearning-network:
|
||||
external: true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue