From 1485180e20fe228d90cde00f78a0561757fb634f Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Thu, 2 May 2024 23:59:38 +0500 Subject: [PATCH] Updated the captcha service to 0.8.1. --- .env.example | 1 + captcha-app/.env.example | 24 +++++++++++++++++++++++ docker-compose-prod.yml | 31 +++++++++++++++++++++++++++++- docker-compose-prod_docker-hub.yml | 31 +++++++++++++++++++++++++++++- docker-compose.yml | 31 +++++++++++++++++++++++++++++- 5 files changed, 115 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 054a452..e8286b0 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,6 @@ DOCKER_APP_PORT=8080 DOCKER_CAPTCHA_PORT=8081 +DOCKER_CAPTCHA_WEBSOCKET_PORT=8082 DOCKER_DB_PORT=3306 MYSQL_ROOT_PASSWORD=root_pass DB_DATABASE=my-projetcs diff --git a/captcha-app/.env.example b/captcha-app/.env.example index df7cfa3..cac3e0f 100644 --- a/captcha-app/.env.example +++ b/captcha-app/.env.example @@ -7,6 +7,12 @@ APP_FORCE_HTTPS=false CAPTCHA_VERIFICATION_DATA_VIEW_LIMIT_IN_MINUTES=1 +APP_CAPTCHA=false +CAPTCHA_API_DOMAIN=http://your-domain-captcha-or-IP:8081 +CAPTCHA_PRIVATE_TOKEN= +CAPTCHA_STATIC_PATH=http://your-domain-captcha-or-IP:8081/captcha +CAPTCHA_PUBLIC_TOKEN= + LOGIN_MAX_REQUEST=20 LOGIN_MAX_EMAIL_REQUEST=10 @@ -70,3 +76,21 @@ VITE_PUSHER_HOST="${PUSHER_HOST}" VITE_PUSHER_PORT="${PUSHER_PORT}" VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" + +REVERB_APP_ID= +REVERB_APP_KEY= +REVERB_APP_SECRET= +REVERB_HOST="captcha-reverb" +REVERB_PORT=9000 +REVERB_SCHEME=http +# * or localhost.com or localhost.com, localhost.net +REVERB_ALLOWED_ORIGINS="*" + +REVERB_HOST_CLIENT="localhost" +REVERB_PORT_CLIENT=8081 +REVERB_SCHEME_CLIENT=http + +VITE_REVERB_APP_KEY="${REVERB_APP_KEY}" +VITE_REVERB_HOST="${REVERB_HOST}" +VITE_REVERB_PORT="${REVERB_PORT}" +VITE_REVERB_SCHEME="${REVERB_SCHEME}" diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index 4240172..05ef617 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -19,7 +19,7 @@ services: # restart: always captcha-app: - image: korelf/service-captcha:0.7.1 + image: korelf/service-captcha:0.8.1 # restart: always cap_drop: - ALL @@ -34,6 +34,35 @@ services: env_file: captcha-app/.env ports: - ${DOCKER_CAPTCHA_PORT}:9000 + captcha-queue: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: queue + env_file: captcha-app/.env + captcha-reverb: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: websockets + env_file: captcha-app/.env + ports: + - ${DOCKER_CAPTCHA_WEBSOCKET_PORT}:9000 + captcha-scheduler: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: scheduler + env_file: captcha-app/.env captcha-redis: image: redis:3.0-alpine # restart: always diff --git a/docker-compose-prod_docker-hub.yml b/docker-compose-prod_docker-hub.yml index 2713baf..8f9f639 100644 --- a/docker-compose-prod_docker-hub.yml +++ b/docker-compose-prod_docker-hub.yml @@ -18,7 +18,7 @@ services: # restart: always captcha-app: - image: korelf/service-captcha:0.7.1 + image: korelf/service-captcha:0.8.1 # restart: always cap_drop: - ALL @@ -33,6 +33,35 @@ services: env_file: captcha-app/.env ports: - ${DOCKER_CAPTCHA_PORT}:9000 + captcha-queue: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: queue + env_file: captcha-app/.env + captcha-reverb: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: websockets + env_file: captcha-app/.env + ports: + - ${DOCKER_CAPTCHA_WEBSOCKET_PORT}:9000 + captcha-scheduler: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: scheduler + env_file: captcha-app/.env captcha-redis: image: redis:3.0-alpine # restart: always diff --git a/docker-compose.yml b/docker-compose.yml index 6045f4d..5b39030 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: image: redis:3.0-alpine captcha-app: - image: korelf/service-captcha:0.7.0 + image: korelf/service-captcha:0.8.1 cap_drop: - ALL cap_add: @@ -31,6 +31,35 @@ services: env_file: captcha-app/.env ports: - ${DOCKER_CAPTCHA_PORT}:9000 + captcha-queue: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: queue + env_file: captcha-app/.env + captcha-reverb: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: websockets + env_file: captcha-app/.env + ports: + - ${DOCKER_CAPTCHA_WEBSOCKET_PORT}:9000 + captcha-scheduler: + image: korelf/service-captcha:0.8.1 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: scheduler + env_file: captcha-app/.env captcha-redis: image: redis:3.0-alpine db: