Merge branch 'main' of https://git.wlcent.cn/Marc.ma/Nilai_Clock
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
# Use Node.js 22 Alpine as the base image
|
||||
FROM node:22-alpine
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of the application code
|
||||
COPY . .
|
||||
|
||||
|
||||
# Install a simple HTTP server for serving static content
|
||||
RUN npm install -g http-server
|
||||
|
||||
# Expose the port the app runs on
|
||||
EXPOSE 3000
|
||||
# Start the application
|
||||
CMD ["node", "backend/server.js"]
|
||||
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user