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.
Azure Container App for Vue.js app crashing
Donnie Kerr
0
Reputation points
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.