edited dockker config
This commit is contained in:
@@ -1,12 +1,19 @@
|
|||||||
FROM node:20-alpine
|
FROM node:18 as builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN npm install
|
|
||||||
|
RUN npm install --frozen-lockfile
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
EXPOSE 8001
|
FROM nginx:alpine AS runner
|
||||||
|
|
||||||
CMD ["npm", "run", "dev"]
|
WORKDIR /usr/share/nginx/html
|
||||||
|
|
||||||
|
COPY --from=builder /app/dist .
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
@@ -1,18 +1,13 @@
|
|||||||
services:
|
services:
|
||||||
# borrow_system-frontend:
|
# usr-frontendV2:
|
||||||
# container_name: borrow_system-frontend
|
# container_name: borrow_system-usr-frontend
|
||||||
# build: ./FrontendV2
|
# build: ./FrontendV2
|
||||||
# ports:
|
# ports:
|
||||||
# - "8001:8001"
|
# - "8001:80"
|
||||||
# environment:
|
|
||||||
# - CHOKIDAR_USEPOLLING=true
|
|
||||||
# volumes:
|
|
||||||
# - ./FrontendV2:/app
|
|
||||||
# - /app/node_modules
|
|
||||||
# restart: unless-stopped
|
# restart: unless-stopped
|
||||||
|
|
||||||
# admin-frontend:
|
# admin-frontend:
|
||||||
# container_name: admin-frontend
|
# container_name: borrow_system-admin-frontend
|
||||||
# build: ./admin
|
# build: ./admin
|
||||||
# ports:
|
# ports:
|
||||||
# - "8003:8003"
|
# - "8003:8003"
|
||||||
@@ -23,7 +18,7 @@ services:
|
|||||||
# - /app/node_modules
|
# - /app/node_modules
|
||||||
# restart: unless-stopped
|
# restart: unless-stopped
|
||||||
|
|
||||||
borrow_system-backend:
|
backend:
|
||||||
container_name: borrow_system-backend
|
container_name: borrow_system-backend
|
||||||
build: ./backend
|
build: ./backend
|
||||||
ports:
|
ports:
|
||||||
@@ -53,20 +48,5 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "3309:3306"
|
- "3309:3306"
|
||||||
|
|
||||||
mysql-new:
|
|
||||||
container_name: borrow_system-mysql-new
|
|
||||||
image: mysql:8.0
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
|
||||||
MYSQL_DATABASE: borrow_system_new
|
|
||||||
TZ: Europe/Berlin
|
|
||||||
volumes:
|
|
||||||
- mysql-data-new:/var/lib/mysql
|
|
||||||
- ./mysql-timezone.cnf:/etc/mysql/conf.d/timezone.cnf:ro
|
|
||||||
ports:
|
|
||||||
- "3310:3306"
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql-data:
|
mysql-data:
|
||||||
mysql-data-new:
|
|
||||||
|
|||||||
Reference in New Issue
Block a user