Skip to content

Latest commit

 

History

History
108 lines (75 loc) · 1.99 KB

File metadata and controls

108 lines (75 loc) · 1.99 KB

TripAdvisor Web:

Web Interface

Home

home

Restarant Info

info

Restaurant Reservations

reservation result

Member Home

home page

Following

following followed

Comment

comment

How to deploy TripAdvisor project ?

Enviroment:

  • Ubuntu: 16.04
  • Python: 3.5.2
  • Backend: Flask Framework
  • Asynchronous: Celery
  • Monitoring : Supervisor, flask-exporter, mysql-exporter
  • Frontend: Javascript (JQuery)
  • Deploy: Docker, Docker Compose
  • Reverse proxy: Nginx
  • Database: Redis, MySQL

Install Docker

$ sudo apt-get update

$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

$ sudo apt-key fingerprint 0EBFCD88

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable"

$ sudo apt-get update

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

Install Docker Compose

$ sudo apt install docker-compose

Deploy TripAdvisor Project

$ cd docker_stg
$ sudo docker-compose up --build -d
  • It wills automatically create tables in MySQL and build website.

MySQL Configuration

$ vim /etc/mysql/mysql.cnf
[mysqld]
bind-address = *

expire_logs_days = 10

connect_timeout = 120
net_read_timeout = 7200

max_connections = 3000
max_allowed_packet = 128M
group_concat_max_len = 102400

slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 2

Prometheus

Monitor Website

monitor

Monitor MySQL