docker-compose.postgres.yml 860 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. services:
  2. server:
  3. build:
  4. context: .
  5. volumes:
  6. - custom:/kutt/custom
  7. environment:
  8. DB_CLIENT: pg
  9. DB_HOST: postgres
  10. DB_PORT: 5432
  11. REDIS_ENABLED: true
  12. REDIS_HOST: redis
  13. REDIS_PORT: 6379
  14. ports:
  15. - 3000:3000
  16. depends_on:
  17. postgres:
  18. condition: service_healthy
  19. redis:
  20. condition: service_started
  21. postgres:
  22. image: postgres
  23. restart: always
  24. user: ${DB_USER}
  25. volumes:
  26. - db_data_pg:/var/lib/postgresql/data
  27. environment:
  28. POSTGRES_DB: ${DB_NAME}
  29. POSTGRES_PASSWORD: ${DB_PASSWORD}
  30. expose:
  31. - 5432
  32. healthcheck:
  33. test: [ "CMD", "pg_isready" ]
  34. interval: 10s
  35. timeout: 5s
  36. retries: 5
  37. redis:
  38. image: redis:alpine
  39. restart: always
  40. expose:
  41. - 6379
  42. volumes:
  43. db_data_pg:
  44. custom: