Sua duong dan volume sang opt/exercise-app
This commit is contained in:
@@ -1,15 +1,11 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
fitness-app:
|
exercise-app:
|
||||||
container_name: fitness-spa
|
build: .
|
||||||
build:
|
container_name: exercise-app
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
ports:
|
|
||||||
- "3005:80" # Map Port 80 của Nginx ra Port 3005 của máy Host
|
|
||||||
volumes:
|
|
||||||
# Ánh xạ file data.json ở ngoài máy host vào trong container (Chế độ Read-Only).
|
|
||||||
# Điều này cho phép cập nhật "nóng" nội dung bài tập mà KHÔNG CẦN build lại ảnh Docker.
|
|
||||||
- ./public/data.json:/usr/share/nginx/html/data.json:ro
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "3005:80"
|
||||||
|
volumes:
|
||||||
|
# Đường dẫn đã được chuẩn hóa theo tên dự án mới
|
||||||
|
- /opt/exercise-app/data.json:/usr/share/nginx/html/data.json
|
||||||
Reference in New Issue
Block a user