Azure Container App for Vue.js app crashing

Donnie Kerr 0 Reputation points
2025-01-17T02:00:25.2666667+00:00

How do you get a Vue.js app to run in an Azure Container App that uses the Github Actions automated deployment given a dockerfile? Mine keeps crashing or timing out. I want it to be accessible via the browser on port 80. I have the target port set to 80 and the dockerfile exposes 80.

Here is the docker file for using http-service, but I also tried the ngnix one as well and both fail.

# Use an official Node.js runtime as a parent image
FROM node:18 AS build-stage

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application source code
COPY . .

# Build the Vue application for production
RUN npm run build

# Use a lightweight Node.js image for serving the app
FROM node:18-alpine AS production-stage

# Install http-server globally
RUN npm install -g http-server

# Set the working directory
WORKDIR /app

# Copy the built files from the previous stage
COPY --from=build-stage /app/dist .

# Expose port 80
EXPOSE 80

# Command to run the http-server
CMD ["http-server", "-p", "80"]

What am I missing? The logs in the portal tell me nothing.

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
511 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Donnie Kerr 0 Reputation points
    2025-01-19T20:40:01.8733333+00:00

    I give up. This is a bug with ACA and/or Github Actions. Container runs fine locally. Settings are correct in ACA in the azure portal and dockerfile is correct. It just cannot build given workspace and module issues above.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.