spam-detector/docker-compose.yaml
2024-11-01 17:06:38 +03:00

41 lines
1005 B
YAML

networks:
spam-detector-internal:
driver: bridge
services:
decision-maker:
build: ./
container_name: spam-detector-decision-maker
environment:
- PORT=${PORT:-8080}
- TOKEN=token12345
entrypoint: [ "python", "-m", "src.app", "-m" ]
volumes:
- type: bind
source: $DATASET
target: /app/dataset.csv
- ${MODELS_DIR}:/app/models
restart: always
ports:
- "8080:${PORT:-8080}"
networks:
- spam-detector-internal
model-updater:
build: ./
container_name: spam-detector-model-updater
environment:
- WEB_API_URL=http://spam-detector-decision-maker:${PORT:-8080}
- TOKEN=token12345
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