Fix API endpoint configuration and domain references

- Change NEXT_PUBLIC_ENTE_ENDPOINT to relative /api for domain flexibility
- Remove runtime JS endpoint replacement (fragile, now unnecessary)
- Fix all domain references to use CLOUDRON_APP_DOMAIN consistently
- Add /ping health check endpoint to Caddy configuration
- Update placeholder server to use dynamic domain

Photos app now working, other apps may need additional fixes.
This commit is contained in:
2025-08-01 13:46:17 -06:00
parent 94dac7a7b3
commit e60248cf80
3 changed files with 26 additions and 31 deletions

View File

@@ -28,10 +28,10 @@ RUN apt-get update && apt-get install -y git && \
RUN corepack enable
# Set environment variables for web app build
# Set the API endpoint to use current origin - this will work at runtime
ENV NEXT_PUBLIC_ENTE_ENDPOINT="https://example.com/api"
# Use relative API endpoint so it works with any domain
ENV NEXT_PUBLIC_ENTE_ENDPOINT="/api"
# Add a note for clarity
RUN echo "Building with placeholder NEXT_PUBLIC_ENTE_ENDPOINT, will be served by Caddy proxy at /api"
RUN echo "Building with relative NEXT_PUBLIC_ENTE_ENDPOINT=/api, will be served by Caddy proxy"
# Debugging the repository structure
RUN find . -type d -maxdepth 3 | sort