services: postgres: image: postgres:16-alpine container_name: hss-postgres environment: POSTGRES_DB: hss_home_service POSTGRES_USER: hss POSTGRES_PASSWORD: hss123 ports: - "5433:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U hss -d hss_home_service"] interval: 5s timeout: 5s retries: 10 restart: unless-stopped redis: image: redis:7-alpine container_name: hss-redis ports: - "6380:6379" command: redis-server --appendonly yes volumes: - redisdata:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 restart: unless-stopped app: build: context: . dockerfile: Dockerfile container_name: hss-app ports: - "18080:8080" environment: SPRING_PROFILES_ACTIVE: docker DB_URL: jdbc:postgresql://postgres:5432/hss_home_service DB_USERNAME: hss DB_PASSWORD: hss123 REDIS_HOST: redis REDIS_PORT: "6379" depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped website: image: nginx:alpine container_name: hss-website ports: - "3080:80" volumes: - ./website/.output/public:/usr/share/nginx/html:ro - ./website/nginx-site.conf:/etc/nginx/conf.d/default.conf:ro depends_on: - app restart: unless-stopped volumes: pgdata: redisdata: