Command:
Purpose: Full server control, updates, file editing, docker commands, file uploads.
Login: root
/ Your_Password_Or_Key
URL:
Purpose: Manage Docker containers, stacks, networks, volumes (Start/Stop/Logs/Deploy).
Login: Your Portainer admin user/password.
Access PortainerURL:
Purpose: Add/manage domains, set up proxy forwarding, handle SSL certificates.
Login: Your NPM admin user/password.
Access NPMURL:
Purpose: Real-time server/container resource monitoring (CPU, RAM, Disk, Network).
Login: None (by default).
Access NetdataGoal: Host clientdomain.com
(and www.clientdomain.com
) served by an Nginx container using the Vite build output (dist
folder).
dist
folder).clientdomain.com
(@
) points to 217.154.61.159
.www.clientdomain.com
(www
) points to 217.154.61.159
.scp
(or rsync
, WinSCP, FileZilla, etc.) to copy the contents of the local dist
folder into the /opt/stacks/clientname/html
directory on the server.
version: '3.8' services: web: image: nginx:alpine container_name: clientname-nginx # Use the SAME 'clientname' identifier restart: unless-stopped volumes: # Map the uploaded static files to Nginx's web root (read-only) - ./html:/usr/share/nginx/html:ro networks: - npm_network # Connect to the shared proxy network networks: npm_network: external: true # Network already exists
Ctrl+X
, Y
, Enter
).https://portainer.jamify.uk
)clientname
(use the same identifier).docker-compose.yml
content from Step 3 into the editor.clientname-nginx
container starts successfully in the Containers list.https://npm.jamify.uk
)clientdomain.com
(Enter), www.clientdomain.com
(Enter).http
clientname-nginx
(the container name).80
(Nginx container's internal port).Block Common Exploits
.Websockets Support
(not needed for static sites).Request a new SSL Certificate
.Force SSL
.HTTP/2 Support
.I Agree...
to Let's Encrypt Terms.https://clientdomain.com
and https://www.clientdomain.com
in a browser (use private/incognito mode for first test).dist
folder).scp
(or your preferred tool) to overwrite the contents of /opt/stacks/clientname/html/
on the server with the contents of the new dist
folder.
clientname-nginx
container is NOT necessary for Nginx serving static files./opt/npm/data
, /opt/npm/letsencrypt
), and persistent application data volumes (especially /opt/stacks/
).apt update && apt upgrade
via SSH. Periodically update Docker images for NPM, Portainer, Netdata, and client applications (usually by pulling the latest image and redeploying the stack in Portainer).df -h
via SSH or via Netdata). Clean up unused Docker images/volumes (docker system prune -a --volumes
) with caution.