Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Latest commit

 

History

History
87 lines (59 loc) · 1.8 KB

README.md

File metadata and controls

87 lines (59 loc) · 1.8 KB

NGINX SPA Ready with GZip enabled

Introduction

Dockerfile to create a NGINX container image who is SPA ready and has GZip enabled.

Getting started

Image Pull

docker pull credija/nginx:lts

Quickstart

Start NGINX using:

docker run --name nginx-credija -d --restart=always \
  --publish 8080:80 \
  -m 256MB \
  credija/nginx:lts

Also, if you want to overwrite and provide your own config file use this:

docker run --name nginx-credija -d --restart=always \
  --publish 8080:80 \
  -m 256MB \
  --volume /opt/your-nginx.conf:/etc/nginx/nginx.conf \
  credija/nginx:lts

Alternatively, you can use the sample docker-compose.yml file to start the container using Docker Compose

Point your browser to http://localhost:8080 and follow the setup procedure to complete the installation.

Maintenance

Upgrading

To upgrade to newer releases:

  1. Download the updated Docker image:
docker pull credija/nginx:{version}
  1. Stop the currently running image:
docker stop nginx-credija
  1. Remove the stopped container
docker rm -v nginx-credija
  1. Start the updated image
docker run -name nginx-credija -d \
  [OPTIONS] \
  credija/nginx:{version}

Shell Access

For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:

docker exec -it nginx-credija bash

References