Nginx setup with utility scripts
A certbot connected external volume, named certificates
Refer here to set up correctly
- Run bootstrap script
./bootstrap.sh DEFAULT_HOST
Warning
bootstrap.sh
must be run in the directory thatdocker-compose.yml
is located, since it usespwd
to check current directory and set as prefix to utility scripts
docker compose up -d
ordocker-compose up -d
to deploy
Generates nginx configuration files
scripts/nginx_genconf proxy DOMAIN [HOST] PORT
scripts/nginx_genconf ssl DOMAIN
To work correctly, certificate for DOMAIN
must be generated beforehand.
To generate certificate, refer here
Enables generated configuration files (creates a symbolic link from sites-available
to sites-enabled
)
scripts/nginx_enable DOMAIN
Disables enabled configuration files (deletes the symbolic link in sites-enabled
)
scripts/nginx_disable DOMAIN
Tests nginx configuration files
scripts/nginx_test
Reloads nginx configuration gracefully using SIGHUP singal (minimal downtime)
scripts/nginx_reload
List enabled / available sites
scripts/nginx_list