How to make firebase type hosting platform on personal droplet?

I am using Phoenix for front-end file server ( a dist folder from vue) and try to automate the process of uploading the files into the particular folder. The process will be similar to firebase hosting.
The basic idea is first to create HTTP listeners in my droplet ( digital ocean), correct me if wrong. Also, suggest how to make password authentication for the system.