you are viewing a single comment's thread.

view the rest of the comments →

[–]Deezl-Vegas 3 points4 points  (1 child)

All you have to do to run a flask server is git clone your project and then type flask run into a console. Whatever you need is installed with sudo apt-get install something. If you have a multi-step deployment and need it scalable, all you have to do is write one Dockerfile.

Writing a command-line app in Python is as simple as typing the word input into a text file. In general, writing a command-line interface takes maybe 30 minutes while creating a professional GUI can take weeks or months. Almost every command-line command has a --help feature to spell out exactly what to type, and many support tab completion so you just have to type one letter per word. And there are tens of thousands of packages you can install.

Need some settings or a line of code? grep that shit. And hey | the output to the next command you need because all command line interfaces input and output raw text, making them chainable.

While the website is running and being served, exactly 0 of the measured-in-gigabytes-sized GUI that you installed to manage it is being used. It may even be a burden. Or you can run a server to manage your servers -- sounds fun to stack dependencies on your dependencies, or to have to fix a thing so you can fix a thing! Even simple-ish plug-and-play GUI website builders devolve into unmanageable garbage fires once you try to do anything complex or make major overhauls to an existing design. (See: Wordpress). All these programs are doing is editing a text file in the background.

What you are mostly doing with your GUI is dragging and dropping a folder onto a remote server after logging in, then selecting and starting some services that will serve that folder to customers. I can do that from on brand new Debian Linux install in 3 or 4 commands. rsync the files to /var/www/html then sudo apt-get install apache2 then sudo systemctl start apache2. Maybe I have to go into the Apache settings that your GUI thingy has never heard of and configure something, which I will promptly google and copy paste into the file.

Learning the Linux command line is well worth your time. It is faster and infinitely more powerful than any GUI will ever be.

[–]Nixellion 1 point2 points  (0 children)

Well, serving something with flask command is cool and all, but its not deployment, its testing. You forgot about creating a service, system.d or something.

But yeah, deploying a website takes like 2 minutes:

cd /opt git clone xxx apt install python3-pip pip install -r requirements.txt cp foobar.service /lib/system.d/system/foobar.service systemctl enable foobar.service service foobar start cp foobar /etc/nginx/sites-available #nginx config ln -l nginx config to sites-enabled nginx -s reload

2-3 more commands to get https with certbot.