# Comments are provided throughout this file to help you get started. # If you need more help, visit the Docker Compose reference guide at # https://docs.docker.com/go/compose-spec-reference/ # Here the instructions define your application as a service called "server". # This service is built from the Dockerfile in the current directory. # You can add other services your application may depend on here, such as a # database or a cache. For examples, see the Awesome Compose repository: # https://github.com/docker/awesome-compose services: nginx: image: nginx:latest ports: - 80:80 - 8080:8080 volumes: - ../nginx:/etc/nginx - ../nginx/sites-enabled:/etc/nginx/sites-enabled - ../nginx/static:/etc/nginx/static - ../nginx/public:/etc/nginx/public - ./logs/nginx:/var/log/nginx depends_on: - eveai_app - eveai_chat eveai_app: build: context: .. dockerfile: ./docker/eveai_app/Dockerfile ports: - 5001:5001 environment: - FLASK_ENV=development - FLASK_DEBUG=1 volumes: - ../eveai_app:/app/eveai_app - ../common:/app/common - ../config:/app/config - ../migrations:/app/migrations - ../scripts:/app/scripts - ./logs:/app/logs - ./tenant_files:/app/tenant_files depends_on: db: condition: service_healthy redis: condition: service_healthy healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5001/health"] interval: 10s timeout: 5s retries: 5 command: ["sh", "-c", "scripts/start_eveai_app.sh"] eveai_workers: build: context: .. dockerfile: ./docker/eveai_workers/Dockerfile # ports: # - 5001:5001 environment: - FLASK_ENV=development - FLASK_DEBUG=1 volumes: - ../eveai_workers:/app/eveai_workers - ../common:/app/common - ../config:/app/config - ../scripts:/app/scripts - ./logs:/app/logs - ./tenant_files:/app/tenant_files depends_on: db: condition: service_healthy redis: condition: service_healthy # healthcheck: # test: [ "CMD", "curl", "-f", "http://localhost:5001/health" ] # interval: 10s # timeout: 5s # retries: 5 command: [ "sh", "-c", "scripts/start_eveai_workers.sh" ] eveai_chat: build: context: .. dockerfile: ./docker/eveai_chat/Dockerfile ports: - 5002:5002 environment: - FLASK_ENV=development - FLASK_DEBUG=1 volumes: - ../eveai_chat:/app/eveai_chat - ../common:/app/common - ../config:/app/config - ../scripts:/app/scripts - ./logs:/app/logs depends_on: db: condition: service_healthy redis: condition: service_healthy healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:5002/health" ] # Adjust based on your health endpoint interval: 10s timeout: 5s retries: 5 command: ["sh", "-c", "scripts/start_eveai_chat.sh"] eveai_chat_workers: build: context: .. dockerfile: ./docker/eveai_chat_workers/Dockerfile # ports: # - 5001:5001 environment: - FLASK_ENV=development - FLASK_DEBUG=1 volumes: - ../eveai_chat_workers:/app/eveai_chat_workers - ../common:/app/common - ../config:/app/config - ../scripts:/app/scripts - ./logs:/app/logs depends_on: db: condition: service_healthy redis: condition: service_healthy # healthcheck: # test: [ "CMD", "curl", "-f", "http://localhost:5001/health" ] # interval: 10s # timeout: 5s # retries: 5 command: [ "sh", "-c", "scripts/start_eveai_chat_workers.sh" ] db: hostname: db image: ankane/pgvector ports: - 5432:5432 restart: always environment: - POSTGRES_DB=eveai - POSTGRES_USER=luke - POSTGRES_PASSWORD=Skywalker! volumes: - ./db/postgresql:/var/lib/postgresql/data - ./db/init.sql:/docker-entrypoint-initdb.d/init.sql healthcheck: test: [ "CMD-SHELL", "pg_isready -d eveai -U luke" ] interval: 10s timeout: 5s retries: 5 redis: image: redis:7.2.5 restart: always expose: - 6379 volumes: - ./db/redis:/data healthcheck: test: [ "CMD", "redis-cli", "ping" ] interval: 10s timeout: 5s retries: 5 #volumes: # db-data: # redis-data: # tenant-files: #secrets: # db-password: # file: ./db/password.txt