-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
25 lines (25 loc) · 875 Bytes
/
docker-compose.yml
File metadata and controls
25 lines (25 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
services:
vectorizer:
# Use the Dockerfile in the current directory to build the image
build: .
# Map port 8000 on the host to port 8000 inside the container
ports:
- "8000:8000"
# Restart the container automatically if it fails
restart: always
# Set the container name for easier identification
container_name: vectorizer_api
# Health check to ensure the service is ready
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/healthz')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# You can specify resource limits to prevent the API from consuming too many resources
# This is a good practice for production deployments
# deploy:
# resources:
# limits:
# cpus: '2'
# memory: 8G