networks: spam-detector-internal: driver: bridge rabbitmq: external: true services: decision-maker: build: ./ container_name: spam-detector-decision-maker environment: - TOKEN=token12345 - RABBITMQ_HOST=${RABBITMQ_HOST} - RABBITMQ_PORT=${RABBITMQ_PORT:-5672} - RABBITMQ_USER=${RABBITMQ_USER} - RABBITMQ_PASS=${RABBITMQ_PASS} - RABBITMQ_QUEUE=${RABBITMQ_QUEUE} entrypoint: [ "python", "-m", "src.app", "-m" ] volumes: - type: bind source: $DATASET target: /app/dataset.csv - ${MODELS_DIR}:/app/models restart: always ports: - "${PORT:-8080}:8080" networks: - spam-detector-internal - rabbitmq model-updater: build: ./ container_name: spam-detector-model-updater environment: - WEB_API_URL=http://spam-detector-decision-maker:${PORT:-8080} - TOKEN=token12345 - RABBITMQ_HOST=${RABBITMQ_HOST} - RABBITMQ_PORT=${RABBITMQ_PORT:-5672} - RABBITMQ_USER=${RABBITMQ_USER} - RABBITMQ_PASS=${RABBITMQ_PASS} - RABBITMQ_QUEUE=${RABBITMQ_QUEUE} entrypoint: [ "python", "-m", "src.app", "-u", "-d", "/app/dataset.csv" ] # entrypoint: [ "bash", "-c", "while true; do sleep 1; done" ] volumes: - type: bind source: $DATASET target: /app/dataset.csv - ${MODELS_DIR}:/app/models/ networks: - spam-detector-internal - rabbitmq