spam-detector/docker-compose.yaml

41 lines
1005 B
YAML
Raw Normal View History

2024-11-01 17:06:38 +03:00
networks:
spam-detector-internal:
driver: bridge
services:
decision-maker:
build: ./
container_name: spam-detector-decision-maker
environment:
- PORT=${PORT:-8080}
2024-11-01 17:06:38 +03:00
- TOKEN=token12345
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
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
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