docker-compose.server.yaml 1005 B

12345678910111213141516171819202122232425262728293031323334353637
  1. services:
  2. postgres:
  3. image: ${POSTGRES_IMAGE:-docker.1ms.run/library/postgres:16}
  4. container_name: maas-base-db
  5. restart: unless-stopped
  6. environment:
  7. POSTGRES_USER: gpustack
  8. POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-gpustack}
  9. POSTGRES_DB: gpustack
  10. volumes:
  11. - postgres-data:/var/lib/postgresql/data
  12. healthcheck:
  13. test: ["CMD-SHELL", "pg_isready -U gpustack"]
  14. interval: 5s
  15. timeout: 5s
  16. retries: 5
  17. maas-base-server:
  18. build:
  19. context: ..
  20. dockerfile: pack/Dockerfile
  21. container_name: maas-base-server
  22. restart: unless-stopped
  23. depends_on:
  24. postgres:
  25. condition: service_healthy
  26. entrypoint: ["/usr/bin/entrypoint.sh", "--gateway-mode", "embedded"]
  27. environment:
  28. GPUSTACK_DATABASE_URL: postgresql://gpustack:${POSTGRES_PASSWORD:-gpustack}@postgres:5432/gpustack
  29. volumes:
  30. - maas-base-data:/var/lib/gpustack
  31. ports:
  32. - "80:80"
  33. volumes:
  34. postgres-data: {}
  35. maas-base-data: {}