Setup: Angular

This example demonstrates how to set up a configuration for an Angular application but can work with many other applications built with Node.js as well with slight modification.

As Angular does not require any custom server to run, the "static" runtime is used. After the build is finished, the content of "/app/dist/example-app/" will be hosted by a web server for static website hosting.

See the complete example code on GitHub

valist.yml

services:
  runtime: static
  dockerfile: valist.Dockerfile
  dist: /app/dist/example_app
  cmd: node_modules/.bin/ng build --prod

valist.Dockerfile

FROM node:alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .

Last updated