Home  >  Q&A  >  body text

python - Web -- 如何在AWS部署网站?

谢谢回答这个问题!
新手自学python+flask,已经写好了想部署试试,但是不知道哪种方案好。了解到有AWS,但又看到有Apache,Nginx,Docker等等的内容,所以问题如下:

1)部署网站究竟是如何实现?了解基本HTTP,但服务器Apache等等这些,Linux,它们关系是怎样的,我应该去查找哪方面的资料?我在书店逛来逛去,比如《高性能Nginx》,又来一本《鸟叔的Linux搭建服务器》(已入基础本),看不出个所以然。
2)看到docker介绍非常简便,准备入坑,但新手真的合适入这个坑吗(专精的意思)?会不会?
3)我目前的理解是想利用一些云平台部署这个网站(目测AWS),然后在上面用linux,再用docker。现在应从哪里入手最好?
4)问个不相关的问题,Flask的SQLAlchemy在应付多表join和多对多关系时变得极其绕和繁杂,想尝试Mongodb+(ORM)mongoengine,据说这个ORM坑较多,有何好推荐?
5)对了不介意的话可以推荐一下相关Rest ful的综合性基础资料吗?看Flask web一章节对其原理有点云里雾里。

非常感谢!

怪我咯怪我咯2763 days ago347

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 17:44:23

    Judging from your question, you should have been exposed to this aspect a lot.

    It feels a bit confusing, and some concepts or the specific functions of the software are not clear.

    AWS is just a place similar to server hosting, which is equivalent to having a computer that can be accessed independently.
    Apache and nginx belong to the server category, while Docker belongs to the container and integrated management category.

    1). As for the relationship between Linux and Apache you mentioned, it is like running a service (Apache) on the system (Linux). Website deployment depends on your language environment. It seems that you are using Python here. You should learn about building a Python web server. There should be a lot of information on the Internet.
    2). I have used docker once, which was on AWS. The storage space I applied for was very small. After using it once, I didn’t dare to use it again. In the later stage, you will definitely still learn. It is not recommended for novices to try it, but I am not opposed to it.
    3). If you are deploying a server, because you are just playing around by yourself and there are not hundreds or thousands of servers to operate, it is not recommended to use docker, just start with the simplest one. How you build it locally can be done on AWS.
    4). I know Python and have planned to spend time learning it. I have only seen the syntax, so it is not convenient to answer.
    5) For the restful part, it is recommended that you put aside Python to learn it first, first know what restful is, and then see if Python has a framework to implement restful.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:44:23

    LZ’s question covers a wide range of topics. In fact, it is more reliable to ask it into several separate questions. But let’s try to answer it. Throw bricks.

    1. You can take a look at full stack python [1]. The picture inside is more intuitive (SF seems to have broken mapping function). Although it lacks scaling things like Load Balancer, you can still refer to the others.

    2. docker is very popular. And it's likely to stay popular. But I think this fire is so popular largely because the industry has accepted micro services. If the architecture is traditional, it won't make much sense. Of course, docker can do many other things, and there is nothing wrong with learning while playing.

    3. AWS North America already directly supports docker. Not yet in Beijing.

    4. Actually, this question is about choosing MySQL or MongoDB. See application.

    5. To fully understand REST, of course you must read Fielding [2]. But it's more theoretical. In fact, there is no standard for using it. Those that fully comply with the REST concept may not necessarily be easy to use. What works well is likely to have compromises. My idea is to make sure it is enough first.


    1. http://www.fullstackpython.com/deployment.html

    2. Fielding, R. T.; Taylor, R. N. (2000)

    reply
    0
  • Cancelreply