File size: 1,546 Bytes
c745a99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
services:
  ministack:
    build: .
    image: ministackorg/ministack:latest
    container_name: ministack
    ports:
      - "4566:4566"
    environment:
      - GATEWAY_PORT=4566
      - LOG_LEVEL=INFO
      - S3_PERSIST=0
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - RDS_BASE_PORT=15432
      - ELASTICACHE_BASE_PORT=16379
    volumes:
      - ./data/s3:/tmp/ministack-data/s3
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      redis:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:4566/_ministack/health')"]
      interval: 10s
      timeout: 3s
      retries: 3
      start_period: 5s
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    container_name: ministack-redis
    ports:
      - "127.0.0.1:6379:6379"
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 5
    restart: unless-stopped

  # Optional: Postgres for RDS (always-on, no Docker-in-Docker needed)
  # Uncomment to have a persistent Postgres available at localhost:5432
  # postgres:
  #   image: postgres:15-alpine
  #   container_name: ministack-postgres
  #   ports:
  #     - "5432:5432"
  #   environment:
  #     POSTGRES_USER: admin
  #     POSTGRES_PASSWORD: password
  #     POSTGRES_DB: mydb
  #   healthcheck:
  #     test: ["CMD-SHELL", "pg_isready -U admin"]
  #     interval: 5s
  #     timeout: 3s
  #     retries: 5
  #   restart: unless-stopped