deploy file

This commit is contained in:
longke
2025-06-20 11:28:53 +08:00
parent 97c0236ad4
commit 27d44a5ec3
3 changed files with 35 additions and 4 deletions
+1 -4
View File
@@ -13,14 +13,11 @@ RUN npm install
# Copy the rest of the application code
COPY . .
# Build the Vue.js application
RUN npm run build
# Install a simple HTTP server for serving static content
RUN npm install -g http-server
# Expose the port the app runs on
EXPOSE 8080
EXPOSE 3000
# Start the application
CMD ["npm", "run", "dev:all"]
CMD ["node", "backend/server.js"]
+23
View File
@@ -0,0 +1,23 @@
version: '3'
services:
app:
build: .
ports:
- '18081:3000'
environment:
- DB_HOST=
- DB_USER=nilai_clock
- DB_PASSWORD=
- DB_NAME=nilai_clock
- DB_PORT=3306
- VITE_API_BASE_URL=//seiyaku.whealthfields.com.my/api
volumes:
- ./rebuild/dist:/app/dist
nginx:
image: nginx:latest
ports:
- "18080:80"
volumes:
- ./build/dist:/usr/share/nginx/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
+11
View File
@@ -0,0 +1,11 @@
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
}