Angular app results in "host ('angular-ui.fly.dev') is not allowed"

Thanks for the response.

I never did figure out what exactly was causing that error, but I decided to look further into Angular builds and how they work and I realized I was going about this in a pretty fundamentally wrong way. ng serve shouldn’t be in my production builds, from what I was reading. My new Dockerfile looks like this and is working as expected.

FROM node:24 AS build
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci
RUN npm install -g @angular/cli
COPY . .
RUN npm run build --prod
FROM nginx:alpine
COPY --from=build /usr/src/app/dist/angular-ui/browser /usr/share/nginx/html
EXPOSE 80

1 Like