services: postgres: image: postgres:18-alpine container_name: gouserfy-postgres environment: POSTGRES_USER: ${DB_USER:-gouserfy} POSTGRES_PASSWORD: ${DB_PASSWORD:-gouserfy} POSTGRES_DB: ${DB_NAME:-gouserfy} ports: - "${DB_PORT:-5432}:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-gouserfy}"] interval: 5s timeout: 5s retries: 5 gouserfy: build: . container_name: gouserfy-app environment: - DB_HOST=postgres - DB_PORT=5432 - DB_USER=${DB_USER:-gouserfy} - DB_PASSWORD=${DB_PASSWORD:-gouserfy} - DB_NAME=${DB_NAME:-gouserfy} - DB_SSLMODE=disable env_file: - .env ports: - "${SERVER_PORT:-8080}:8080" depends_on: postgres: condition: service_healthy volumes: postgres_data: