I deployed the server developed with FastAPI on vercel and it is working. Server is updated to use mysql server and is now working with local mysql. But now I have no way to deploy that on vercel. Can anyone give some tips about how to do that?
Related
can someone please help me. I have problems to do test on gitlab with a django application. It's about connexion to the server, I've try with postgress or mysql but nothing!!
I am trying to learn how to use CosmosDB with Flask. I went through the tutorial on building a flask app using CosmosDB for MongoDB API(https://learn.microsoft.com/en-us/azure/cosmos-db/create-mongodb-flask#run-the-web-app). I keep getting the error:
pymongo.errors.ConnectionFailure: [WinError 10061] No connection could be made because the target machine actively refused it.
The emulator is running, but it will not connect. I followed the instructions and got it to work once before, but now it no longer works.
EDIT: I do have the Python Extension for VSCode
Did you install the Python extension? You can go through this Build a Flask app using Azure Cosmos DB for MongoDB API and verify if you have done it correcly.
I have an application deployed in pythonanywhere everything is running fine till now. Now I want to connect my app with the database as my application needs to interact with it. My .sql file is stored in my computer.
How can I import it to the project's database in the pythonanywhere server ?
I have tried connecting that database using MySQL Workbench so that I can import from there but Workbench wasn't able to connect to that server.
There are two helpful instructions on PythonAnywhere, one about Backing up (and restoring) MySQL databases other about accessing your MySQL database from outside PythonAnywhere (you can do it using ssh tunnel).
I need to deploy a Flask app with Celery and Redis to Amazon AWS. I'm used to work with AWS Lightsail and this will be my option.
By the other side I must( as per company policy) deploy my Postgres DB to AWS RDS
Im planing to use Dockers with Ngix, Unicorn in the AWS Lightsail to deploy the app that as I said uses Celery and Redis. So all this will be in the docker in Lightsail
By the other side the DB will be in RDS without using docker
What I want with this approach is a quick deployment of changes and upgrades to the app .
What I want to know is this :
1-Is this a good approach to production, that will help me in quick deployments ?
2-Does anybody know of some examples of docker-compose files that could help me with this ?
3-Could someone please let me know some limitation in this approach and
4-Is Lightsail a good option in AWS for a Docker deployment of flask apps as the one described here ?
Thanks
When I asked this question, was looking for some examples of easy deployment of medium complexity apps to AWS. The app itself used Celery Redis and Amazon AWS RDS postgress DB. The deployment to Amazon Lightsail was pretty simple after I look a video in you tube from an Amazon Engineer. I basically created the container in my local laptop , used an initial script while deploying an OS only Ubuntu instance and that scrip loaded a daemon so Ubuntu "system" could daemonize my Docker deployment when restarting. I created 3 videos in you tube where I explained everything.
If someone needs help with this see the videos at:
Dockerize Flask API ,NGINX, GUNICORN, CELERY,REDIS to Amazon AWS
Part1:3
Dockerize Flask API ,NGINX, GUNICORN, CELERY,REDIS to Amazon
AWS Part2:3
Dockerize Flask API ,NGINX, GUNICORN, CELERY,REDIS to
Amazon AWS Part3:3
Links below:
Part1:3
Part2:3
Part3:3
I want to host my Django 1.10 web application on WHM(VPS). for that i have installed Django and another necessary tools on WHM(VPS) by ssh login. and i also have uploaded my Django application code through cpanel in public_html directory.
When i run python manage.py runserver <ip_address:8000> from ssh terminal, i am able to access that application. but when i close the ssh terminal, it terminates all the running process. so could not access application after that.
So, Is there any way that without running python manage.py script i can access Django application?
Any help would be highly appreciated.
Thank you.
Django comes with a built-in development server, it's not really meant to be used when deploying to a remote VPS.
There are some great resources to help you along, but what you're likely going to want to do is deploy your app on a stack using gunicorn or uwsgi as an application server and a web server like Nginx or apache 2 as a reverse proxy.
I personally use Nginx and uwsgi.
There are some great resources explaining how to deploy a Django server. Have a look at this one from digital ocean, it was a great help when I needed to set up a production server correctly: https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04
best of luck with it!