I know there exists a plugin for nginx to load the config through perl. I was wondering, does anyone have any experience doing this without using a plugin? Possibly a fuse-backed Python script that queries a DB?
I would really like to not use the perl plugin, as it doesn't seem that stable.
I haven't seen any working solution to solve your task, a quick google search doesn't give any useful information either (it doesn't look like HttpPerlModule could help with DB stored configuration).
It sounds like it's a good task to develop and contribute to Nginx project !
Related
I am a python programmer, and server administration was always a bit hard for me to immerse to. I always read tutorials and in practice just repeated the steps each time I set up a new project. I always used uwsgi, but realized that gunicorn is easier for simple projects like mine.
Recently, I successfully set up my first single gunicorn application with the help of this article: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
But what should I do if I want to launch another app with gunicorn? Should I just make another systemd service file, like myproject.service? I'm looking for convenient 'one click' setup, so I can easily transfer my project to another machine, or add more gunicorn applications without much configuration. Or maybe, I should use another process manager like supervisor? What is the best solution for a newbie like me?
Sorry if my question's too dumb, but I'm really trying.
Thank you!
So I've been looking into ways to using Heroku for a small-scale personal project (Python Flask + MongoDB), however I can't seem to find much information on how to do simple continuos integration testing or simple unit testing on a Heroku staging instance. I feel that this would be necessary to make sure that everything will work in production, before actually making it public.
There doesn't seem to be much information on as to how I could achieve this. There are a couple of CI addons that would help, but they currently work only with Ruby/RoR (tddium, Rails on Fire) and proper testing on Heroku seems like a problem that should already be solved by a number of people. Buildpacks seem like a potential way to achieve what I need, but I'd rather use existing tools than re-invent the wheel myself.
So the question is, what are my options?
I wouldn't advise on running your tests on Heroku, as the platform isn't designed to do this. It will probably take you much longer to get the Platform to work than simply using another hosted service. There are lots of other alternatives (e.g. Codeship where I am one of the founders).
At Codeship we are currently working on Python support which will be released soon. MongoDB (as well as lots of other tools) is integrated nicely and works out of the box. We are also focusing very strongly on helping you deploy often and integrate that nicely, so you can work on your app and not your infrastructure.
CircleCi has Python support! It also directly supports MongoDB. You'll be able to set it up very easily.
None of the hosted CI solutions, Circle included, run directly on Heroku. We (Circle - I'm a founder) have looked into it, but the way people write tests make this awkward (they're really designed to be run on the same machine). Heroku is also very slow and memory constrained, while the main goal of a CI system is to get results to you quickly.
I have a project implemented with Django, I wish to use a tool to help me deploy the project onto the server automatically. I know the fabric library can do it, but I want to know whether or not there are other tools that have similar capabilities.
You can check the entire list here.
http://www.djangopackages.com/grids/g/deployment/
Fabric is too easy.
http://fabfile.org
How can i create a safe environment to create new and play with my web applications?
My ingredients so far: python,flask,github,heroku --- I have effectively created a app using flask and heroku (it just says hello world)
I have some knowledge of python. Have read through but hardly understand the flaskr tutorial for Flask. I do however envision that i'm going to be very frustrated if i can't have some kind of version history of my stumblings.
Without being sure i feel like the recipe might include: Github and virtualenv and some coping pasting of directories...
whats a recommended way to do this?
Just setup a GitHub repository and start hacking away with Flask.
Some pointers:
Use SQLAlchemy for database operations. It's secure and easy to use.
Either dive right into your project or make some simple test ones with Flask. It's a really beautiful framework to work with and is easy to learn, so just try to accomplish some simple tasks and get used to how it works.
I suggest you to use virtualenv and virtualenvwrapper, this way you can work on isolated pythons without filling your system's python with many eggs and switch between them easily.
I have a python/django application that im running on my dreamhost account. Excuse me for the novice question, but I'm a Java programmer by day and relatively new to python.
Ideally what I'd like to do is set something up where I can take the code I have locally, upload it to my server and then touch the restart.txt file. I realize I could probably accomplish this with a bat/ftp script, but I has hoping for something a bit more advanced/robust. I have a local mercurial repository where I'm doing version control, is it at all feasible to get mercurial running on dreamhost, and then set up so that when I push changes from my local repo to the server repo, those get deployed to the proper location?
Are there other solutions I should be looking at? I guess all I'm looking for is someone to point me in the right direction.
All the cool guys are using fabric nowadays. It's exactly what you looking for.