spam-detector/docker-compose.yaml

55 lines
1.4 KiB
YAML
Raw Normal View History

2024-11-01 17:06:38 +03:00
networks:
spam-detector-internal:
driver: bridge
2024-11-01 23:35:45 +03:00
rabbitmq:
external: true
2024-11-01 17:06:38 +03:00
services:
decision-maker:
build: ./
container_name: spam-detector-decision-maker
environment:
- PORT=${PORT:-8080}
2024-11-01 17:06:38 +03:00
- TOKEN=token12345
2024-11-01 23:35:45 +03:00
- 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
2024-11-01 17:06:38 +03:00
restart: always
ports:
- "8080:${PORT:-8080}"
networks:
- spam-detector-internal
2024-11-01 23:35:45 +03:00
- rabbitmq
model-updater:
build: ./
container_name: spam-detector-model-updater
environment:
2024-11-01 17:06:38 +03:00
- WEB_API_URL=http://spam-detector-decision-maker:${PORT:-8080}
- TOKEN=token12345
2024-11-01 23:35:45 +03:00
- RABBITMQ_HOST=${RABBITMQ_HOST}
- RABBITMQ_PORT=${RABBITMQ_PORT:-5672}
- RABBITMQ_USER=${RABBITMQ_USER}
- RABBITMQ_PASS=${RABBITMQ_PASS}
- RABBITMQ_QUEUE=${RABBITMQ_QUEUE}
2024-11-01 17:06:38 +03:00
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/
2024-11-01 17:06:38 +03:00
networks:
- spam-detector-internal
2024-11-01 23:35:45 +03:00
- rabbitmq