services: postgres: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme} volumes: - postgres_data:/var/lib/postgresql/data - ./postgres_sh:/docker-entrypoint-initdb.d deploy: resources: limits: memory: 256M healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7-alpine restart: unless-stopped command: redis-server --maxmemory 48mb --maxmemory-policy allkeys-lru deploy: resources: limits: memory: 64M healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 meta: build: ./meta-custom restart: unless-stopped depends_on: postgres: condition: service_healthy redis: condition: service_healthy ports: - "127.0.0.1:5001:8080" volumes: - ./config:/etc/sr.ht - meta_data:/var/lib/meta.sr.ht deploy: resources: limits: memory: 256M git: build: ./git-custom restart: unless-stopped depends_on: postgres: condition: service_healthy redis: condition: service_healthy meta: condition: service_started ports: - "127.0.0.1:5003:8080" - "0.0.0.0:22222:22" volumes: - ./config:/etc/sr.ht - git_data:/var/lib/git.sr.ht - git_repos:/var/lib/git deploy: resources: limits: memory: 256M todo: build: ./todo-custom restart: unless-stopped depends_on: postgres: condition: service_healthy redis: condition: service_healthy meta: condition: service_started ports: - "127.0.0.1:5004:8080" volumes: - ./config:/etc/sr.ht - todo_data:/var/lib/todo.sr.ht deploy: resources: limits: memory: 256M hub: build: ./hub-custom restart: unless-stopped depends_on: postgres: condition: service_healthy redis: condition: service_healthy meta: condition: service_started ports: - "127.0.0.1:5002:8080" volumes: - ./config:/etc/sr.ht deploy: resources: limits: memory: 256M volumes: postgres_data: meta_data: git_data: git_repos: todo_data: