services: app: build: context: . dockerfile: Dockerfile container_name: spomeniqr-app restart: unless-stopped environment: - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD:-postgres}@db:5432/monuments - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY} - CLERK_SECRET_KEY=${CLERK_SECRET_KEY} - NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-https://testbed.mk} - NEXT_PUBLIC_APP_DOMAIN=${NEXT_PUBLIC_APP_DOMAIN:-testbed.mk} - S3_ENDPOINT=${S3_ENDPOINT} - S3_REGION=${S3_REGION:-eu-2} - S3_ACCESS_KEY_ID=${S3_ACCESS_KEY_ID} - S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY} - S3_BUCKET_NAME=${S3_BUCKET_NAME:-monuments-images} depends_on: db: condition: service_healthy networks: - spomeniqr db: image: postgres:16-alpine container_name: spomeniqr-db restart: unless-stopped environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_DB: monuments volumes: - pgdata:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 networks: - spomeniqr nginx: image: nginx:alpine container_name: spomeniqr-nginx restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./nginx/conf.d:/etc/nginx/conf.d - ./certbot/conf:/etc/letsencrypt - ./certbot/www:/var/www/certbot depends_on: - app networks: - spomeniqr networks: spomeniqr: driver: bridge volumes: pgdata: