File size: 930 Bytes
d2ba52b
 
 
 
 
 
 
 
 
2e94196
d2ba52b
2e94196
d2ba52b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Production overrides for docker-compose.yml
# Usage: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

services:
  fastapi:
    restart: always
    deploy:
      resources:
        limits:
          memory: 4G # Increased for transformers models
        reservations:
          memory: 2G
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"
    environment:
      - ENVIRONMENT=production
      - LOG_LEVEL=info

  # Add nginx reverse proxy for production
  nginx:
    image: nginx:alpine
    container_name: fashion-analyzer-nginx
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./ssl:/etc/nginx/ssl:ro
    depends_on:
      - fastapi
    networks:
      - fashion-analyzer
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"