Installer for local webapp for stock management using django - django

I am looking to build a webapp for stock management, since it does not need to be hosted on the internet( only admin and sellers can access it ), with it's database on the local computer, I need to find a way for making it easier for the sellers to use the webapp without running a server and all that stuff since they are not tech-savvy

A server is not mainly a computer on the internet or cloud. You can use a local computer as a server. This tutorial is a great way to gather all of the Django application's parts into a single docker-compose file. You can run this docker-compose on any computer, and every computer inside your local network would have access to it (obviously, you should put the computer running the docker-compose in your local network first). Make sure the server's firewall (The computer running the docker-compose) allows traffic on the application's port.

Related

How to ssh port forward into a server to access a mysql host server for local work on Django web app and Jupyter notebook?

I'm unfamiliar with this terrain, so if any one can guide me in a step by step manner- it would really help. My MySQL database sits on a AWS host X- "ec2-xxx-xxx-xxx-xx.compute-1.amazonaws.com". It is blocked to access from individual local machines and is usually accessed from another working server Y- "ec2-yy-yyy-yyy-yy.compute-1.amazonaws.com" through port '3306'. Now it is especially inconvenient to access this via terminal SSH every time and scripts while they run, its hard to prototype or build an elaborate app. I'd like to set up a SSH tunnel from my local to server Y to be able to access MySQL host X from my local machine, to run queries from my locally deployed Jupyter notebook as well as local working-in-progress Django web app.
The reason why I ask for something more step-by-step is that I have to port forward to another server hosting a redis database which again is accessible through a specific server only. So, I'll be able to carry the solution from here to there too. I'm willing to go into chat as well if needed, but I need to resolve this rather quickly. Thanks!
PS: I've tried many guides off of the internet, but nothing has worked, it's become clear to me that I'm missing some foundational understanding or pathway. That's why I'm here, trying to start from the ground.

How to host a dedicated server for WSO2EMM?

I have no trouble making WSO2EMM work on my local machine. The problem is I want to upload it to a server, but I am having a hard time finding a server that supports WSO2Carbon.
Is there any hosting sites available I can put it or if not, is it possible I can host it myself?

How do I access my Django server from outside?

My computer is connected to our college's local network. I am able to access my django server in the same network from another computer. When I try to do the same from an outside internet connection, I get an " Webpage not found error" . I used the ip given by Whatsmyip.com to access it from outside. Also, I started the server using the command : python manage.py runserver 0:8000
Use something like:
LocalTunnel http://localtunnel.me/
Ngrok https://ngrok.com/
These create a tunnel to your localhost. You cannot host from a common IP shared by an internal network. Read more about localhost here: http://en.wikipedia.org/wiki/Localhost
Please note that the tools above allow you to share a link to your site and is mostly meant for development and testing. If you really want to host a Django server, either do it on an external server or contact your infrastructure team in college to see if they even allow such a thing.
For external hosting, Heroku (https://www.heroku.com) can be a good option with a reasonable free plan.
This depends on your college network. Often, computers in local networkds are behind a NAT (one single external ip for several clients). At this point, the request cannot be routed from out- to inside. Maybe a college technician can help you to route your page.
I think it's first important to note that manage.py runserver is for local development. It is not meant to be used for deployment.
If you want to access your website from "outside", you should consider deploying it. You can then read more about this here : https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
Also, like stated in other answers, depending on how is configured your college network, it may not be possible to access your development server from outside, because :
It probably has NAT rules for local networks
There are probably port restrictions and a firewall for outside access (usually college networks are very restrictive from inside AND from outside)

Accessing local devices in Point of Sale web application

I am building a web application, not hosted by the client but on the cloud somewhere, probably azure. It will need the ability to access some local devices such as a receipt printer or cash draw from where they run it. Via a browser this is obviously not possible.
I was thinking of creating a service that they can install locally on their PC that listens to a web service and when it gets a message can perform the tasks such as opening the cash draw.
Is this how people have done similar things in the past? Are there other methods? What technologies do you recommend as I plan on the local service being able to be run on either PC or Mac with minimum fuss. I was considering either Flex or Mono (the app was written in ASP.NET), any other suggestions?

Move to 2 Django physical servers (front and backend) from a single production server?

I currently have a growing Django production server that has all of the front end and backend services running on it. I could keep growing that server larger and larger, but instead I want to try and leave that main server as my backend server and create multiple front end servers that would run apache/nginx and remotely connect to the main production backend server.
I'm using slicehost now, so I don't think I can benefit from having the multiple servers run on an intranet. How do I do this?
The first step in scaling your server is usually to separate the database server. I'm assuming this is all you meant by "backend services", unless you give us any more details.
All this needs is a change to your settings file. Change DATABASE_HOST from localhost to the new IP of your database server.
If your site is heavy on static content, creating a separate media server could help. You may even look into a CDN.
The first step usually is to separate the server running actual Python code and the database server. Any background jobs that does processing would probably run on the database server. I assume that when you say front end server, you actually mean a server running Python code.
Now, as every request will have to do a number of database queries, latency between the webserver and the database server is very important. I don't know if Slicehost has some feature to allow you to create two virtual machines that are "close" in terms of network latency(a quick google search did not find anything). They seem like nice guys, so maybe you could ask them if they have such a service or could make an exception.
Anyway, when you do have two machines on Slicehost, you could check the latency between them by simply pinging between them. When you have the result you will probably know if this is at all feasible or not.
Further steps depends on your application. If it is media heavy, then maybe using a separate media server would make sense. Otherwise the normal step is to add more web servers.
--
As a side note, I personally think it makes more sense to invest in real dedicated servers with dedicated network equipment for this kind of setup. This of course depends on what budget you are on.
I would also suggest looking into Amazon EC2 where you can provision servers that are magically close to each other.