version: "3.8" services: postgres: image: postgres:16-alpine container_name: erp-postgres environment: POSTGRES_USER: ${POSTGRES_USER:-erp} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-erp_dev_2024} POSTGRES_DB: ${POSTGRES_DB:-erp} expose: - "5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-erp}"] interval: 5s timeout: 5s retries: 5 deploy: resources: limits: cpus: "1.0" memory: 512M redis: image: redis:7-alpine container_name: erp-redis command: redis-server --requirepass ${REDIS_PASSWORD:-erp_redis_dev} expose: - "6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-erp_redis_dev}", "ping"] interval: 5s timeout: 5s retries: 5 deploy: resources: limits: cpus: "1.0" memory: 512M volumes: postgres_data: redis_data: