How to Build & Run for Host Nginx
Build the Image Run the Container Bound to Localhost Verify Host Port Security: Check that port 5000 is bound strictly to 127.0.0.1 and not 0.0.0.0: # 1. Symlink configuration if…
Build the Image
bash
docker build -t my-flask-app:1.0 .Run the Container Bound to Localhost
text
docker run -d \
--name flask-app \
--restart unless-stopped \
-p 127.0.0.1:5000:5000 \
my-flask-app:1.0Verify Host Port Security:
Check that port 5000 is bound strictly to 127.0.0.1 and not 0.0.0.0:
bash
sudo netstat -tulpn | grep 5000
# OR
sudo ss -tulpn | grep 5000# 1. Symlink configuration if not already done
sudo ln -sf /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
2. Verify Nginx configuration syntax
sudo nginx -t
3. Reload Nginx
sudo systemctl reload nginx
hosting/vultr/how-to-host-website/docker-way/README.md
Related articles
- HostingHow to export yaml from vultrTo view config · To list nodes
- HostingReadme(How to Configure a Firewall for a Cloud-Based Server (Linux & Windows) )[https://contabo.com/blog/how-to-configure-a-firewall-for-a-cloud-based-server-linux-windows/]
- HostingReadme(How to Create, Edit, and Delete DNS Records)[https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/]
- HostingReadmeHow to Deploy SFTPGo as an AWS Transfer Family Alternative