Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description


Configuration for an nginx supported single page app run on docker.

Grab it from docker hub.


  1. Place all static assets in /assets. This will be the root static asset directory.
    For example if your site is available at, will be served from /assets/index.html. Likewise, will be served from /assets/css/styles.css.

  2. Provide an api server located at http://api:8000. The nginx server will forward all requests to /api to http://api:8000. Note: this will require linking containers together either manually or through a tool like docker-compose.
    For example if your site is available at, a request to will be forwarded to http://api:8000/give/me/data.

Example Dockerfile:

FROM tgolson/nginx-spa
ADD ./assets /assets

Advanced example using Docker Compose

  image: tgolson/nginx-spa
    - "8080:8080"
    - client
    - api

In this example the nginx-spa container still forwards all request to an api container, but also finds the expected assets from the client container.

Here is an example of the client container's Dockerfile.

FROM ubuntu
ADD ./public /assets
VOLUME /assets
Docker Pull Command
Source Repository