Static page running on nGinx as a Docker container.
Package comes with self-signed SSL certificate. Files are located in ssl
folder - put here your certificate.
Server configuration is placed in nginx/conf.d
folder.
Build Docker image:
docker build --tag nginx-static-page .
Create container from the image:
docker run \
--name page-www-example-com \
--detach \
--publish 80:80 \
--publish 443:443 \
--volume $(pwd)/src:/usr/share/nginx/html \
--volume $(pwd)/nginx/conf.d/:/etc/nginx/conf.d/ \
--volume $(pwd)/nginx/snippets/:/etc/nginx/snippets/ \
--volume $(pwd)/ssl/:/etc/ssl/ \
nginx-static-page
On Windows $(pwd)
needs to be replaced with absolute path.
If no other services are going to be run on the server, then it's enough to run docker-compose to serve
docker-compose up --detach