docker-compose.yml 641 B

123456789101112131415161718192021222324252627282930313233
  1. version: '3.8'
  2. services:
  3. postgres:
  4. image: postgres:16-alpine
  5. environment:
  6. POSTGRES_DB: weather_bot
  7. POSTGRES_USER: bot
  8. POSTGRES_PASSWORD: botpass
  9. volumes:
  10. - pgdata:/var/lib/postgresql/data
  11. ports:
  12. - '5432:5432'
  13. healthcheck:
  14. test: ['CMD-SHELL', 'pg_isready -U bot -d weather_bot']
  15. interval: 10s
  16. timeout: 5s
  17. retries: 5
  18. redis:
  19. image: redis:7-alpine
  20. ports:
  21. - '6379:6379'
  22. volumes:
  23. - redisdata:/data
  24. healthcheck:
  25. test: ['CMD', 'redis-cli', 'ping']
  26. interval: 10s
  27. timeout: 5s
  28. retries: 5
  29. volumes:
  30. pgdata:
  31. redisdata: