hgh 1 year ago
parent
commit
273cc7aa79
2 changed files with 50 additions and 20 deletions
  1. 4 4
      Dockerfile
  2. 46 16
      docker-compose.yml

+ 4 - 4
Dockerfile

@@ -8,17 +8,17 @@ COPY ./package*.json ./
 # Install dependencies
 RUN yarn install --production --frozen-lockfile
 
-ARG APP_API_SERVER=http://shahidpalizvani.ir/api
+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=8081
+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
+ARG LOG_REQUEST=true
 
 # Copy all files
 COPY ./ ./
@@ -40,7 +40,7 @@ WORKDIR /var/www/app/dist/ssr
 RUN yarn install
 
 # Expose the listening port
-EXPOSE 3000
+#EXPOSE  ${PORT}
 
 # Run container as non-root (unprivileged) user
 # The "node" user is provided in the Node.js Alpine base image

+ 46 - 16
docker-compose.yml

@@ -1,17 +1,47 @@
-version: "3.3"
+version: "3.8"
+
 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"
+  palizvani-front-containter3000:
+    image: palizvani-front-image:latest
+    environment:
+      - PORT=3000
+    ports:
+      - "3000:3000"
+    container_name: palizvani-front-containter3000_container
+    restart: always
+
+  palizvani-front-containter3001:
+    image: palizvani-front-image:latest
+    environment:
+      - PORT=3001
+    ports:
+      - "3001:3001"
+    container_name: palizvani-front-containter3001_container
+    restart: always
+
+  palizvani-front-containter3002:
+    image: palizvani-front-image:latest
+    environment:
+      - PORT=3002
+    ports:
+      - "3002:3002"
+    container_name: palizvani-front-containter3002_container
+    restart: always
+
+  palizvani-front-containter3003:
+    image: palizvani-front-image:latest
+    environment:
+      - PORT=3003
+    ports:
+      - "3003:3003"
+    container_name: palizvani-front-containter3003_container
+    restart: always
+
+  palizvani-front-containter3004:
+    image: palizvani-front-image:latest
+    environment:
+      - PORT=3004
+    ports:
+      - "3004:3004"
+    container_name: palizvani-front-containter3004_container
+    restart: always