- 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
$ 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
$ sudo apt install docker-compose
$ cd docker_stg
$ sudo docker-compose up --build -d
- It wills automatically create tables in MySQL and build website.
$ 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