Welcome to TDBSoverflow, Our class's own StackOverflow. Our rules:
  1. Use only meaningful and self-explanatory titles
  2. Tag your questions with meaningful keywords
  3. Use upvotes and downvotes to rate the answers
  4. When you receive a satisfying answer - Click the "V" button
Remember: you may get up to 5 bonus points to your final grade!

deployment to tomcat server

+4 votes

I'm trying to deploy our project to tomcat, and I'm not sure if I understand the instructions. 

In rec 3 presentation there are instructions Amit attached, and they say: 

nohup python3 -m "from my_flask_web_server import run_server;

run_server.run_server()" &

However, in the link found on the same page, I found instructions that say the deployment should be done this way: 

python manage.py runserver delta-tomcat-vm:<port number>

 I tried the second option, and the server seems to be running on the specified port, but I cannot have any access to it in the browser (and not even pinging the server from within nova/delta-tomcat connection).

So what is the correct way to deploy it?

Thanks in advance,

asked Jan 15, 2018 by Pazshepsels (530 points)
Please note which framework do you use
Im using flask and python 2.

1 Answer

+3 votes
Best answer

If you are using Flask, as far as I'm concerned the second option you mentioned won't work - this method fits Django application, as when creating a django app, the script manage.py  is created along with all the relevant methods (e.g. `runserver`).

You have to follow Amit's method. Try and use the following command at stage 4:

nohup python server.py &

Or stick with the simple instructions in flask manual.


Also note this issue about making the server visible (app.run(host= '')).

Hope this helps.

answered Jan 15, 2018 by oz (12,430 points)
selected Jan 15, 2018 by Pazshepsels
thanks!! its working for me.
Then be a good friend and select his answer as best answer
sure :) forgot its different than +1 which i also did