diff --git a/docker-compose.yaml b/docker-compose.yaml index 3ed44ea..082e120 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,6 +12,8 @@ services: - REDIS_PASSWORD=${REDIS_PASSWORD} - APP_PREVIOUS_KEYS=${APP_PREVIOUS_KEYS} - PHP_OPCACHE_ENABLE=${PHP_OPCACHE_ENABLE:-1} + networks: + - nexo-cloud depends_on: redis: condition: service_healthy @@ -25,6 +27,8 @@ services: - POSTGRES_USER=${DB_USERNAME:-nexo-cloud} - POSTGRES_PASSWORD=${DB_PASSWORD:-nexo-cloud} - POSTGRES_DB=${DB_DATABASE:-nexo-cloud} + networks: + - nexo-cloud healthcheck: test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", "${DB_DATABASE:-nexo-cloud}" ] interval: 5s @@ -35,6 +39,8 @@ services: command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD} environment: - REDIS_PASSWORD="${REDIS_PASSWORD}" + networks: + - nexo-cloud healthcheck: test: redis-cli ping interval: 5s @@ -44,6 +50,8 @@ services: image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest command: ["php", "/var/www/html/artisan", "schedule:work"] stop_signal: SIGTERM + networks: + - nexo-cloud healthcheck: test: ["CMD", "healthcheck-schedule"] start_period: 10s @@ -56,6 +64,8 @@ services: image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest command: [ "php", "/var/www/html/artisan", "queue:work", "--tries=3" ] stop_signal: SIGTERM + networks: + - nexo-cloud healthcheck: test: [ "CMD", "healthcheck-queue" ] start_period: 10s @@ -80,3 +90,6 @@ services: start_period: 10s ports: - "8000:8000" + +networks: + nexo-cloud: