hgh 1 год назад
Родитель
Сommit
cde02e858b
3 измененных файлов с 47 добавлено и 67 удалено
  1. 0 50
      Dockerfile-production
  2. 0 17
      docker-compose-production.yml
  3. 47 0
      docker-compose2.yml

+ 0 - 50
Dockerfile-production

@@ -1,50 +0,0 @@
-FROM node:20.9-alpine AS prebuild
-
-# Set working directory
-WORKDIR /var/www/app
-
-COPY ./package*.json ./
-
-# Install dependencies
-RUN yarn install --production --frozen-lockfile
-
-ARG APP_API_SERVER=https://shahidpalizvani.ir/api
-ARG VUEX_PERSISTED_STATE_KEY=vuex
-ARG GET_TIME_SERVER=/time
-ARG APP_API=/api
-ARG NGINX_PORT=80
-ARG SSR_PORT=3000
-ARG APP_ENV=development
-ARG GOOGLE_TAG_MANAGER_TOKEN=GTM-PNP1111
-ARG HEAP_MEMORY_ALLOCATION_INTERVAL=10000
-ARG MAX_HEAP_MEMORY_ALLOCATION_IN_PERCENT=70
-ARG LOG_REQUEST=false
-
-# Copy all files
-COPY ./ ./
-
-# Build app on SSR mode
-RUN yarn build:ssr
-
-
-##############################################
-
-
-FROM node:20.9-alpine
-
-
-COPY --from=prebuild /var/www/app/dist/ssr /var/www/app/dist/ssr
-
-WORKDIR /var/www/app/dist/ssr
-
-RUN yarn install
-
-# Expose the listening port
-EXPOSE 3000
-
-# Run container as non-root (unprivileged) user
-# The "node" user is provided in the Node.js Alpine base image
-
-USER node
-
-CMD ["node", "/var/www/app/dist/ssr/index.js"]

+ 0 - 17
docker-compose-production.yml

@@ -1,17 +0,0 @@
-version: "3.3"
-services:
-  nextjs:
-    build: ./
-    network_mode: "host"
-    restart: "always"
-#  nginx:
-#    build: ./nginx
-#    network_mode: "host"
-#    volumes:
-#      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
-#    depends_on:
-#      - nextjs
-#    ports:
-#      - "8081:80"
-#    ports:
-#      - "${NGINX_PORT}:80"

+ 47 - 0
docker-compose2.yml

@@ -0,0 +1,47 @@
+version: "3.8"
+
+services:
+  palizvani-front-containter3000:
+    image: palizvani-front-image2:latest
+    environment:
+      - PORT=3000
+    ports:
+      - "3000:3000"
+    container_name: palizvani-front-containter3000_container
+    restart: always
+
+  palizvani-front-containter3001:
+    image: palizvani-front-image2:latest
+    environment:
+      - PORT=3001
+    ports:
+      - "3001:3001"
+    container_name: palizvani-front-containter3001_container
+    restart: always
+
+  palizvani-front-containter3002:
+    image: palizvani-front-image2:latest
+    environment:
+      - PORT=3002
+    ports:
+      - "3002:3002"
+    container_name: palizvani-front-containter3002_container
+    restart: always
+
+  palizvani-front-containter3003:
+    image: palizvani-front-image2:latest
+    environment:
+      - PORT=3003
+    ports:
+      - "3003:3003"
+    container_name: palizvani-front-containter3003_container
+    restart: always
+
+  palizvani-front-containter3004:
+    image: palizvani-front-image2:latest
+    environment:
+      - PORT=3004
+    ports:
+      - "3004:3004"
+    container_name: palizvani-front-containter3004_container
+    restart: always