From 3c9e3291213b1b0b16398a51ccc62eb03ae21d09 Mon Sep 17 00:00:00 2001 From: wallaceosmar Date: Sat, 23 Nov 2024 18:42:40 +0000 Subject: [PATCH] Adicionar docker-compose.yaml --- docker-compose.yaml | 83 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 docker-compose.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..1e939ab --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,83 @@ +services: + nexo-cloud: + image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest + ports: + - "8080:8080" + - "8443:8443" + environment: + - SSL_MODE=${SSL_MODE-off} + - APP_KEY=${APP_KEY} + - APP_NAME=${APP_NAME} + - DB_USERNAME=${DB_USERNAME} + - DB_PASSWORD=${DB_PASSWORD} + - REDIS_PASSWORD=${REDIS_PASSWORD} + - APP_PREVIOUS_KEYS=${APP_PREVIOUS_KEYS} + - PHP_OPCACHE_ENABLE=${PHP_OPCACHE_ENABLE:-1} + depends_on: + redis: + condition: service_healthy + postgres: + condition: service_healthy + reverb: + condition: service_healthy + postgres: + image: postgres:16-alpine + environment: + - POSTGRES_USER="${DB_USERNAME:-nexo-cloud}" + - POSTGRES_PASSWORD="${DB_PASSWORD:-nexo-cloud}" + - POSTGRES_DB="${DB_DATABASE:-nexo-cloud}" + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", "${DB_DATABASE:-nexo-cloud}" ] + interval: 5s + retries: 10 + timeout: 2s + redis: + image: redis:7.2-alpine + command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD} + environment: + - REDIS_PASSWORD="${REDIS_PASSWORD}" + healthcheck: + test: redis-cli ping + interval: 5s + retries: 10 + timeout: 2s + task: + image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest + command: ["php", "/var/www/html/artisan", "schedule:work"] + stop_signal: SIGTERM + healthcheck: + test: ["CMD", "healthcheck-schedule"] + start_period: 10s + depends_on: + redis: + condition: service_healthy + postgres: + condition: service_healthy + queue: + image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest + command: [ "php", "/var/www/html/artisan", "queue:work", "--tries=3" ] + stop_signal: SIGTERM + healthcheck: + test: [ "CMD", "healthcheck-queue" ] + start_period: 10s + depends_on: + redis: + condition: service_healthy + postgres: + condition: service_healthy + reverb: + image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest + command: [ "php", "/var/www/html/artisan", "--port=8000", "reverb:start" ] + stop_signal: SIGTERM + environment: + - REVERB_APP_ID=${REVERB_APP_ID:-271026} + - REVERB_APP_KEY=${REVERB_APP_KEY:-dyadpyflxsz00fd60az2} + - REVERB_APP_SECRET=${REVERB_APP_SECRET:-quuxylmbloar05e6kk0e} + - REVERB_HOST="${REVERB_HOST:-*}" + - REVERB_PORT=${REVERB_PORT:-8000} + - REVERB_SCHEME=${REVERB_SCHEME:-http} + healthcheck: + test: [ "CMD", "healthcheck-reverb" ] + start_period: 10s + ports: + - "8000:8000"