services: postgres: image: postgres:18-alpine container_name: jobtracker-postgres environment: POSTGRES_DB: jobtracker POSTGRES_USER: jobtrackeru POSTGRES_PASSWORD: jobtracker1 ports: - "5434:5432" volumes: - postgres18-data:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U jobtrackeru -d jobtracker"] interval: 5s timeout: 5s retries: 5 zookeeper: image: confluentinc/cp-zookeeper:7.6.1 container_name: jobtracker-zookeeper environment: ZOOKEEPER_CLIENT_PORT: 2181 ZOOKEEPER_TICK_TIME: 2000 ports: - "2181:2181" healthcheck: # The Confluent image only enables the `srvr` four-letter command, so probe # with that rather than `ruok` (which is blocked and can never succeed). # A healthy standalone node replies with a line starting "Mode: standalone". test: ["CMD-SHELL", "echo srvr | nc -w 2 localhost 2181 | grep -q Mode"] interval: 10s timeout: 5s retries: 15 start_period: 30s kafka: image: confluentinc/cp-kafka:7.6.1 container_name: jobtracker-kafka depends_on: zookeeper: condition: service_healthy ports: - "9092:9092" environment: KAFKA_BROKER_ID: 1 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" KAFKA_LISTENERS: INTERNAL://0.0.0.0:29092,EXTERNAL://0.0.0.0:9092 healthcheck: test: ["CMD-SHELL", "kafka-topics --bootstrap-server localhost:29092 --list >/dev/null 2>&1"] interval: 10s timeout: 10s retries: 10 start_period: 20s redis: image: redis:7-alpine container_name: jobtracker-redis command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"] ports: - "6379:6379" volumes: - redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 application-service: build: context: ./application-service network: host container_name: application-service ports: - "8081:8081" environment: DB_HOST: postgres DB_PORT: 5432 DB_NAME: jobtracker DB_USER: jobtrackeru DB_PASSWORD: jobtracker1 KAFKA_BOOTSTRAP_SERVERS: kafka:29092 TRACING_SAMPLING_PROBABILITY: 0.0 depends_on: postgres: condition: service_healthy kafka: condition: service_healthy notification-service: build: context: ./notification-service network: host container_name: notification-service ports: - "8082:8082" environment: KAFKA_BOOTSTRAP_SERVERS: kafka:29092 FOLLOW_UP_REMINDER_DELAY: 2m INTERVIEW_PREP_REMINDER_DELAY: 1m OFFER_FOLLOW_UP_REMINDER_DELAY: 3m NOTIFICATION_SCHEDULER_POOL_SIZE: 2 TRACING_SAMPLING_PROBABILITY: 0.0 depends_on: kafka: condition: service_healthy analytics-service: build: context: ./analytics-service network: host container_name: analytics-service ports: - "8083:8083" environment: KAFKA_BOOTSTRAP_SERVERS: kafka:29092 REDIS_HOST: redis REDIS_PORT: 6379 TRACING_SAMPLING_PROBABILITY: 0.0 depends_on: kafka: condition: service_healthy redis: condition: service_healthy frontend: build: context: ./frontend network: host container_name: jobtracker-frontend ports: - "8080:80" depends_on: - application-service - notification-service - analytics-service volumes: postgres18-data: redis-data: