File size: 660 Bytes
df5a768
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
version: "3.9"

services:
  solar-predictor:
    build:
      context: .
      dockerfile: Dockerfile
    image: solar-lstm-predictor:latest
    container_name: solar_predictor
    ports:
      - "5000:5000"          # host:container  →  http://localhost:5000
    environment:
      PORT: 5000
      WORKERS: 2             # gunicorn workers (increase for prod)
      TIMEOUT: 120
      FLASK_DEBUG: 0
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "python3", "-c",
             "import urllib.request; urllib.request.urlopen('http://localhost:5000/health')"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s