Skip to content

[Bug]: Docker build fails + Missing documentation for reverse proxy deployments #761

@eals2019

Description

@eals2019

Operating System

Linux

Run Mode

Docker

App Version

0.13.0

My notes

I enjoy self-hosting self-hosting open-source webapps like this, and I've started to get into the realm of creating my own web-apps using AI (hence why I wanted to host AutoMaker), although I am not a coder myself. The process of self-hosting this has been a little complex due to a few bugs I've encountered in the process, including this bug. Copilot has been able to help resolve the bug and concluded this was something worthy of a bug report. I hope this is valuable to you and not AI-generated slop. I'm willing to try to answer any questions you might have, but also realize I'm not a coder 😅

Bug Description

Docker deployment has two build-blocking issues and lacks documentation for deploying behind a reverse proxy (Cloudflare Tunnel, nginx, etc.).

Bug 1: Missing spec-parser COPY in Dockerfile

Steps to reproduce:

  1. Clone repo
  2. Run docker-compose build

Expected: Build succeeds
Actual: Build fails - npm can't find @automaker/spec-parser

Fix: Add to Dockerfile around line 31:
COPY libs/spec-parser/package*.json ./libs/spec-parser/

Bug 2: Missing zod dependency in UI

Steps to reproduce:

  1. Build succeeds after Bug 1 fix
  2. UI fails at runtime with missing zod module

Fix: Add "zod": "^3.23.8" to apps/ui/package.json dependencies

Documentation Gap: VITE_SERVER_URL for reverse proxy deployments

When deploying behind a reverse proxy where the UI and API are on different URLs, users need to:

  1. Set VITE_SERVER_URL build arg to the public API URL (default: http://localhost:3008)
  2. Set CORS_ORIGIN env var to the public UI URL (default: http://localhost:3007)
  3. Rebuild the UI image when changing VITE_SERVER_URL (it's baked in at build time, not runtime)

Key insight not documented: VITE_SERVER_URL is a build-time variable. Changing it requires docker compose build --no-cache ui.

Suggested documentation additions

  • Add VITE_SERVER_URL to the Docker Deployment section of README... The only way I was able to find this was by reviewing the DockerFile
  • Note that it's build-time (not runtime configurable), so changes requires the container to be rebuilt
  • Note that the web client needs to be able to communicate with the server URL, and that it does NOT communicate directly between containers, like other web apps do.
  • Add example for reverse proxy / split-domain deployments
  • Explain the VITE_SERVER_URLCORS_ORIGIN relationship

Checklist

  • I have searched existing issues to ensure this bug hasn't been reported already
  • I have provided all required information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions