Answer the question
In order to leave comments, you need to log in
Easy to install python framework?
When I installed Django on a combat server, I had to suffer a lot, install gunicorn supervisor, then configure wsgi and so on.
Are there frameworks in python that are easy to install? like yii2, laravel etc. That is, to configure nginx, put the desired version of python and that's it.
Answer the question
In order to leave comments, you need to log in
docker + docker-compose, consisting of two services:
1. nginx/Caddy, where (most often) you need to put one file: nginx.conf/Caddyfile, respectively
2. Gunicorn/uWSGI + django
For review: https://github.com /wemake-services/wemake-django-t...
With docker, no systemd or package installations are required. All you need is to install the docker itself.
PS Caddy installs and maintains a fresh certificate from Let's Encrypt as a bonus, your service is protected and available via HTTPS out of the box AT ALL without any action on your part.
It is not very clear why you need a python if you do not develop on it.
But first things first:
- the language is put in any case. php, python, ruby, whatever, depending on what application you are deploying.
- a webserver to you in any case to put. apache, nginx, light or something else, it's a matter of personal preference.
- the DB too is put by definition. installing the appropriate driver is a mandatory procedure for any language.
- installation of the application server. this is also a common part for any language. each language almost certainly has its own specific solution. for python it's gunicorn, for ruby it's unicorn, for perl like starman or twiggy, for php it's php-fpm. you can use the uwsgi package, which supports several languages through plugins, in order to figure out the settings once and then just use it.
- package manager. this, if not common to all languages, is a fairly typical solution. npm for node, cpan for perl, composer for php, for example.
- installation of a sandbox. for python it is virtualenv. this tool allows you to give the applications you run the necessary packages without having to install them in the system directory. each application needs the package versions it needs! python is not unique here either. for php or ruby, for example, there are similar tools. By the way, if the only application will live on the server, then this step can be skipped, and everything will be put into the system directory.
- and only now the installation of the framework itself: pip install django. follow the deployment instructions from the framework documentation, specify the base, roll the migrations ...
Most of the steps to deploy your application are common to many languages and many frameworks. Maybe it's worth teaching the materiel?
BottlePy https://bottlepy.org/docs/dev/ is a single file micro framework. You can download the framework file itself and just drop it into the project folder, and then include it in the import code)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question