Deploying an Angular app using Docker/Dokku

I’m using a Digital Ocean droplet + Dokku (Docker) and I’m curious about the best way to deploy an Angular app.

Angular apps are static files. What are the recommended and/or easiest ways to setup a server to serve them (on Dokku + VPS)?

  • Deploy AngularJS app into docker container
  • AngularJS and NodeJS app in Docker
  • Hapi.js is not listening to subdomains?
  • Error creating DigitalOcean droplet using docker-machine
  • How to deploy Meteor and Phusion Docker to Digital Ocean with Docker?
  • Protractor running in docker returns element not existing but in localhost does
  • I’ve seen a number of ways floated on blogs but thought asking here might be helpful in getting ideas and generating knowledge that will help other programmers.

  • How can I map a volume in a running docker container?
  • “The output of `ssh-add -l` doesn't contain 'RSA'. Start the agent, add your keys?” in Docker
  • Debugging rails app running docker with vagrant
  • configure Angular 2 Webpack App in Docker container environment specific
  • How to push to AWS EC2 Service Container from a specific git branch (ie 'staging')
  • Is it possible to use Gitlab and Wordpress container linked to only one Mariadb container?
  • One Solution collect form web for “Deploying an Angular app using Docker/Dokku”

    I think your question has quite a broad scope that’s not just limited to Dokku / Angular but applies to the deployment of any application using static assets.

    I would suggest starting with the 12 Factor App ( methodology and also reading Heroku’s implementation of this methodology in the form of a gem (, particularly the section under serving static files. While you might not be writing a Rails app it applies to any application.

    In summary of the gems, your app should be responsible for serving the static files directly (without the help of Nginx or other web server) then rely on a CDN to distribute the files for fast access.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.