- Set up the 404 page and update the redirect policy
Found out that it’s the *.service issue which I put wrong working environment and /bin
Fixed permissions for Gunicorn
Sqlite3 has one connection issue but the log is really that clear!
Added logging functions to Gunicorn and started to check the error.log
I found Hexo and really liked it’s design and simple structure and most importantly, I can just put my work or writings on GitHub as a backup.
The rest of the articles can be recovered one by one, but there’re 5-6 weekly summaries are gone forever.
A catastrophic event happened to my website and I feel so regretful and painful to update here:
- EC2 hung when I was installing Docker image
- I tried Stop on AWS console and it’s not responding
- I tried Terminate then and it’s doing its work
- My EC2 is gone forever together with all the data on it
- The last thing I have is a backup from wordpress login one year ago
I spent the following 3-4 hours to do all the set up again!
After 2 weeks, the Flask app is working and I’ve successfully deployed it on AWS with Nginx:
- It’s alive on AWS now, the Flask app mimicking Instagram functions!
- More features are under discovery and development!
- Add Comment function to each post
- Add upload function
- Store the images using AWS S3
- Finished the development with Signup and Login/Logout functions with Flask.
- Finished the 1st version of simple Instagram Flask app
I’m recently started to look at Docker and was trying to build an Instagram-like Flask app, during the dev process, I can combine the app with Docker and Jenkins and follow the best engineering approach.
Also, the Celery and Redis also attracts my attention and I’m reading blogs and articles about them too.
Made following changes during past 2 days:
Jenkins is running with SSL and created a new domain for external users.
CI PipeLine for Flask simple app is built.
The development I made during last couple of days:
- The website is officially running under HTTPS.
- Use CertBot to do the renew for yangzhang.us and www.yangzhang.us
- Lesson learnt is remember to enable PORT 443 on AWS[^**]!
I’m so excited and proud to announce that the blog you are seeing right now is on Nginx!!!!
Well it’s working now:
- Tried the basic set up and configuration of Nginx
- Run Nginx together with Apache
- Server 2 WP website with 2 servers concurrently on AWS.
It’s an intermediate step, I’ve done followings during the past month:
- Retired the VPS from Godaddy.com and started to use AWS.
- Running Apache as the server and Wordpress as the blog system on EC2 instance now.
- I was learning the Django and Flask and was building them locally.
- I’m still learning the Nginx
WordPress website has so many restrictions to do customization and practice the coding framework such as Django, Flask, etc.
And I just find out that Sphinx is really an awesome tool to compose a doc-like post and it has the basic style and JS functions.
Thus my recent target will be using the Sphinx to replace this WP website and use Flask to host it. According to my research, it seems that I also need Nginx to hold the static files? (for Sphinx mainly)[^*].
[^]: It had lots of in accurate statements and misunderstanding of the hierarchy of web site. (Reviewed at 2018/05/20*)
[^**]: Now I’m using a “web_access” role defined on AWS which enabled all the basic ports for a website(SSH, HTTPS, etc.)