x-env: &env POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-photoplaces_dev} REDIS_PASSWORD: ${REDIS_PASSWORD:-photoplaces_dev} MINIO_PASSWORD: ${MINIO_PASSWORD:-photoplaces_dev} services: postgres: image: postgis/postgis:16-3.4-alpine environment: POSTGRES_DB: photoplaces POSTGRES_USER: photoplaces POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-photoplaces_dev} ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U photoplaces"] interval: 5s retries: 5 redis: image: redis:7-alpine command: redis-server --requirepass ${REDIS_PASSWORD:-photoplaces_dev} ports: - "6379:6379" volumes: - redisdata:/data healthcheck: test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-photoplaces_dev}", "ping"] interval: 5s retries: 5 minio: image: minio/minio:latest command: server /data --console-address ":9001" ports: - "9000:9000" - "9001:9001" volumes: - miniodata:/data environment: MINIO_ROOT_USER: photoplaces MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD:-photoplaces_dev} healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] interval: 5s retries: 5 migrate: image: migrate/migrate:v4.17 command: -path=/migrations -database "postgres://photoplaces:${POSTGRES_PASSWORD:-photoplaces_dev}@postgres:5432/photoplaces?sslmode=disable" up volumes: - ./backend/migrations:/migrations depends_on: postgres: condition: service_healthy profiles: - tools backend: build: context: ./backend dockerfile: Dockerfile ports: - "8080:8080" environment: APP_ENV: ${APP_ENV:-development} DATABASE_URL: postgres://photoplaces:${POSTGRES_PASSWORD:-photoplaces_dev}@postgres:5432/photoplaces?sslmode=disable REDIS_URL: redis://:${REDIS_PASSWORD:-photoplaces_dev}@redis:6379/0 S3_ENDPOINT: http://minio:9000 S3_ACCESS_KEY: photoplaces S3_SECRET_KEY: ${MINIO_PASSWORD:-photoplaces_dev} S3_BUCKET: photoplaces JWT_SECRET: ${JWT_SECRET:-dev-secret} JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-dev-refresh-secret} CLOUDPAYMENTS_PUBLIC_ID: "" CLOUDPAYMENTS_API_SECRET: "" depends_on: postgres: condition: service_healthy redis: condition: service_healthy minio: condition: service_healthy volumes: - ./backend:/app - backend-modules:/app/node_modules healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/api/v1/health"] interval: 10s timeout: 5s retries: 5 start_period: 10s frontend: build: context: ./frontend dockerfile: Dockerfile ports: - "3000:3000" environment: NEXT_PUBLIC_API_URL: http://localhost:8080/api/v1 NEXT_PUBLIC_MAP_PROVIDER: yandex NEXT_PUBLIC_YANDEX_MAPS_API_KEY: "" depends_on: backend: condition: service_healthy volumes: - ./frontend:/app - frontend-modules:/app/node_modules healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"] interval: 10s timeout: 5s retries: 5 start_period: 15s volumes: pgdata: redisdata: miniodata: backend-modules: frontend-modules: