I wanted to make a few files remotely editable.
Inside portainer under the stack section
Click + Add Stack
version: '2'
services:
droppy:
container_name: droppy
image: silverwind/droppy
ports:
- 8989:8989
volumes:
- /docker/Droppy:/config
- /docker/Droppy/files:/files
restart: unless-stopped
Click Deploy the Stack
Go to what ever web hosting platform you are using and add the subdomain name that you are going to use.
Assuming you already have Nginx installed
Navigate to your Nginx page -> click on the Proxy Hosts -> Add Proxy Host
Add a new host:
Put in the dns name you want to use hit enter
place the appropriate port using the one that you used above ex:8989
navigate to the SSL tab
Request a new SSL Certificate
tick Force SSL and HTTP/2 Support on
supply your email address
Hit save
After a moment it will have completed
Due to a glitch in Nginx you will have to edit the record and just retick Force SSL and HTTP/2 Support back on
Now that you have the basic template for the configuration setup for Nginx we will have to go into the console on portainer. Under Containers you will find your nginx containter mine was called “nginx-proxy-manager” click on the Exec Console in the Quick actions column. Click connect.
Type the following into the console:
vi /config/nginx/proxy_host/*.conf
replace the * with what ever is the highest number .conf file in the directory
Place this at the top of the file below the header
upstream droppy {
server 127.0.0.1:8989;
}
You may need to replace that with the ip address of the machine you are running the server on.
under the “location /” section in the file add:
{
proxy_pass http://droppy/;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-Port $remote_port;
proxy_http_version 1.1;
proxy_cache off;
proxy_buffering off;
proxy_redirect off;
proxy_request_buffering off;
proxy_ignore_client_abort on;
proxy_connect_timeout 7200;
proxy_read_timeout 7200;
proxy_send_timeout 7200;
client_max_body_size 0;
since you specifically set the proxy settings you will want to comment out
include conf.d/include/proxy.conf;
by adding a # in front of it
Finally save and close the file and exit the console.
Back in the Containers section in portainer tick the box next to your Nginx container and click restart.
now you should be able to visit the site using droppy.yourwebsite.com
If you have any questions leave a comment below.