diff --git a/.env.example b/.env.example index f259a13..a7f2fd4 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,6 @@ DOCKER_APP_PORT=8080 DOCKER_CAPTCHA_NGINX_PORT=8081 +DOCKER_WEBSOCKET_PORT=8082 MYSQL_ROOT_PASSWORD=root_pass DB_DATABASE=capcha DB_USERNAME=capcha diff --git a/docker-compose.yml b/docker-compose.yml index 47666ad..2c80bbf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,7 @@ services: ports: - ${DOCKER_CAPTCHA_NGINX_PORT}:80 captcha-app: - image: korelf/service-captcha:0.7.0 + image: korelf/service-captcha:0.8.0 cap_drop: - ALL cap_add: @@ -35,6 +35,37 @@ services: - captcha-redis - db env_file: docker/captcha-app/.env + + captcha-queue: + image: korelf/service-captcha:0.8.0 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: queue + env_file: docker/captcha-app/.env + captcha-reverb: + image: korelf/service-captcha:0.8.0 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: websockets + env_file: docker/captcha-app/.env + ports: + - ${DOCKER_WEBSOCKET_PORT}:9000 + captcha-scheduler: + image: korelf/service-captcha:0.8.0 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: scheduler + env_file: docker/captcha-app/.env + captcha-swagger: image: swaggerapi/swagger-ui environment: diff --git a/docker-compose_prod.yml b/docker-compose_prod.yml index b100c9f..e8da62c 100644 --- a/docker-compose_prod.yml +++ b/docker-compose_prod.yml @@ -26,7 +26,7 @@ services: ports: - ${DOCKER_CAPTCHA_NGINX_PORT}:80 captcha-app: - image: korelf/service-captcha:0.7.0 + image: korelf/service-captcha:0.8.0 cap_drop: - ALL cap_add: @@ -38,8 +38,40 @@ services: - "9000" depends_on: - captcha-redis + - captcha-reverb - db env_file: docker/captcha-app/.env + + captcha-queue: + image: korelf/service-captcha:0.8.0 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: queue + env_file: docker/captcha-app/.env + captcha-reverb: + image: korelf/service-captcha:0.8.0 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: websockets + env_file: docker/captcha-app/.env + ports: + - ${DOCKER_WEBSOCKET_PORT}:9000 + captcha-scheduler: + image: korelf/service-captcha:0.8.0 + # restart: always + depends_on: + - db + - captcha-redis + environment: + CONTAINER_ROLE: scheduler + env_file: docker/captcha-app/.env + captcha-swagger: image: swaggerapi/swagger-ui environment: diff --git a/docker/captcha-app/.env.example b/docker/captcha-app/.env.example index f39ab38..6114a37 100644 --- a/docker/captcha-app/.env.example +++ b/docker/captcha-app/.env.example @@ -29,7 +29,7 @@ DB_DATABASE=capcha DB_USERNAME=capcha DB_PASSWORD=capcha_pass -BROADCAST_DRIVER=log +BROADCAST_DRIVER=reverb CACHE_DRIVER=redis FILESYSTEM_DISK=local QUEUE_CONNECTION=redis @@ -70,3 +70,17 @@ 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=8082 +REVERB_SCHEME_CLIENT=http +