File size: 1,288 Bytes
9c1c0ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
services:
  ui:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8501:8501"
    environment:
      ARTIFACT_ROOT: /app/artifacts
      DATABASE_URL: sqlite:////app/artifacts/datapilot.db
    volumes:
      - datapilot_artifacts:/app/artifacts
    read_only: true
    tmpfs:
      - /tmp:size=128m
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    mem_limit: 2g
    cpus: 2

  api:
    build:
      context: .
      dockerfile: Dockerfile.api
    ports:
      - "8000:8000"
    environment:
      ARTIFACT_ROOT: /app/artifacts
      DATABASE_URL: sqlite:////app/artifacts/datapilot.db
      CORS_ORIGINS: http://localhost:8501
    volumes:
      - datapilot_artifacts:/app/artifacts
    read_only: true
    tmpfs:
      - /tmp:size=128m
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    mem_limit: 2g
    cpus: 2

  worker:
    build:
      context: .
      dockerfile: Dockerfile.worker
    network_mode: none
    read_only: true
    tmpfs:
      - /tmp:size=32m,noexec,nosuid
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    mem_limit: 256m
    cpus: 0.5
    pids_limit: 64

volumes:
  datapilot_artifacts: