From 8d71c6835cf0d610df0b49be3291eeeaa0100e4d Mon Sep 17 00:00:00 2001 From: G Date: Wed, 14 Aug 2024 16:10:35 +0330 Subject: [PATCH] docker/pipeline changes --- Dockerfile | 2 +- docker-compose.production.yml | 134 +++++++++++++++++----------------- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ea9527ba..81eefb816 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN yarn install --frozen-lockfile \ # --- -FROM node:18.14-alpine as production +FROM node:22.6.0-alpine as production WORKDIR /usr/src/app diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 765304b1f..c880dc8d4 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -1,81 +1,81 @@ -version: '3.6' +# version: '3.8' services: api: image: ${CONTAINER_IMAGE:-backend} volumes: - uploads_volume:/usr/src/app/uploads - environment: - PORT: 3000 - DB_HOST: db - DB_USER: postgres - DB_NAME: say_dapp - DB_PASS_FILE: /run/secrets/postgres-password - secrets: - - postgres-password - networks: - - default - - traefik-public - configs: - - source: nest-config - target: /usr/src/app/.env - deploy: - replicas: 1 - update_config: - parallelism: 1 - order: start-first - placement: - constraints: - - node.labels.${ENVIRONMENT} == true - mode: replicated - labels: - - traefik.enable=true - - traefik.docker.network=traefik-public - - traefik.constraint-label=traefik-public - - traefik.http.routers.${STACK_NAME}-api-http.entrypoints=http - - traefik.http.routers.${STACK_NAME}-api-http.rule=Host(`${DOMAIN?Variable not set}`) - - traefik.http.routers.${STACK_NAME}-api-http.service=${STACK_NAME}-api - - traefik.http.routers.${STACK_NAME}-api-http.middlewares=https-redirect - - traefik.http.routers.${STACK_NAME}-api.entrypoints=https - - traefik.http.routers.${STACK_NAME}-api.rule=Host(`${DOMAIN?Variable not set}`) - - traefik.http.routers.${STACK_NAME}-api.service=${STACK_NAME}-api - - traefik.http.routers.${STACK_NAME}-api.tls=true - - traefik.http.routers.${STACK_NAME}-api.tls.certresolver=le - - traefik.http.services.${STACK_NAME}-api.loadbalancer.server.port=3000 +# environment: +# PORT: 3000 +# DB_HOST: db +# DB_USER: postgres +# DB_NAME: say_dapp +# DB_PASS_FILE: /run/secrets/postgres-password +# secrets: +# - postgres-password +# networks: +# - default +# - traefik-public +# configs: +# - source: nest-config +# target: /usr/src/app/.env +# deploy: +# replicas: 1 +# update_config: +# parallelism: 1 +# order: start-first +# placement: +# constraints: +# - node.labels.${ENVIRONMENT} == true +# mode: replicated +# labels: +# - traefik.enable=true +# - traefik.docker.network=traefik-public +# - traefik.constraint-label=traefik-public +# - traefik.http.routers.${STACK_NAME}-api-http.entrypoints=http +# - traefik.http.routers.${STACK_NAME}-api-http.rule=Host(`${DOMAIN?Variable not set}`) +# - traefik.http.routers.${STACK_NAME}-api-http.service=${STACK_NAME}-api +# - traefik.http.routers.${STACK_NAME}-api-http.middlewares=https-redirect +# - traefik.http.routers.${STACK_NAME}-api.entrypoints=https +# - traefik.http.routers.${STACK_NAME}-api.rule=Host(`${DOMAIN?Variable not set}`) +# - traefik.http.routers.${STACK_NAME}-api.service=${STACK_NAME}-api +# - traefik.http.routers.${STACK_NAME}-api.tls=true +# - traefik.http.routers.${STACK_NAME}-api.tls.certresolver=le +# - traefik.http.services.${STACK_NAME}-api.loadbalancer.server.port=3000 - db: - image: postgres:12 - secrets: - - postgres-password - environment: - POSTGRES_DB: say_dapp - POSTGRES_USER: postgres - POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password - volumes: - - postgres_volume:/var/lib/postgresql/data - deploy: - replicas: 1 - update_config: - parallelism: 1 - order: stop-first - placement: - constraints: - - node.labels.${ENVIRONMENT} == true +# db: +# image: postgres:12 +# secrets: +# - postgres-password +# environment: +# POSTGRES_DB: say_dapp +# POSTGRES_USER: postgres +# POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password +# volumes: +# - postgres_volume:/var/lib/postgresql/data +# deploy: +# replicas: 1 +# update_config: +# parallelism: 1 +# order: stop-first +# placement: +# constraints: +# - node.labels.${ENVIRONMENT} == true volumes: postgres_volume: uploads_volume: -networks: - traefik-public: - external: true +# networks: +# traefik-public: +# external: true -secrets: - postgres-password: - name: ${STACK_NAME}-postgres-password - external: true +# secrets: +# postgres-password: +# name: ${STACK_NAME}-postgres-password +# external: true -configs: - nest-config: - name: ${STACK_NAME}.env - external: true +# configs: +# nest-config: +# name: ${STACK_NAME}.env +# external: true