Table of Contents
MetaPloy is just a containerized Nginx reverse proxy that acts as the main webserver. It exposes a docker network named metaploy-network
and a volume named metaploy-nginx-config-volume
. The volume is mounted at /etc/nginx/sites-enabled/
Each projected hosted on the server should be containerized and connected to the metaploy-network
. Each project has its own Nginx configuration file which should be copied to the metaploy-nginx-config-volume
volume.
These config files are included inside the top-level http directive and should contain only the server directives. See the usage section for examples.
Docker and docker compose are the only required dependencies. You can either install Docker Desktop or the Docker Engine. For minimal installations and server use cases, Docker Engine is recommended.
- Clone this repository.
- Copy the contents of the
.env.template
file into the.env
file. Create the file if it doesn't exist. - Set the
SERVER_PORT
variable to the desired port. This is the port at which the server will be accessible on the system. - Run
docker compose up
to start MetaPloy.
Sometimes we have to debug things out in production environment. To make this process streamlined there is an auto reload script running as a background service which checks for any changes made to nginx configurations (/etc/nginx/nginx.conf
and /etc/nginx/sites-enabled/*
) and reloads nginx automatically. Check out the script here. In case you need to debug the script itself you can check-out the logs in the docker container located at /nginx_auto_reload_service.log
.