A platform you’re able to form any kind of activities to invite netizens to participate your events. Also, it’s a website that makes you meet new friends who share the same hobbies with you.
I’m an adventurous person who would like to break my comfort zone to experience the world. People who want to experience new things or make new friends can utilize the web to make their lives splendid. Most importantly, I’d like to showcase my full-stack developing skills and proficiency in AWS.
- I developed the web without using any templates on the internet. I did it from the scratch on my own.
- Use async, await to fetch api and get data from server
- Simplify HTML templates with Jinja
- The web can be adapted to English and Chinese
- Adapt web to any size of screen
- Add OG properties to have distinctive graphics and descriptions when sharing on social media
- Apply Google map to show the accurate position of events
- Establish server with Flask
- Make use of RESTful API to let front-ends read, create, patch or delete data. All APIs URLs are displayed on second.py.
- Separate different functions in each part. Models are wrapped in models.db.py, views are in static and templates folders, controllers are in app.py
- Send emails with Python via Zoho Mail when hosts deliver messages to attendees
- Produce a limited token when an user login, which is a credential for server to identify the user
- Utilize a reverse proxy to conceal IP address of the web with a domain name
- Create a domain name, meetgather.site, on GoDaddy and connecting it with IP address of Meetgather
- Secure URL with https by Certbot
- Write Dockerfile, make an image and run the image on EC2 without setting up environment.
- Use Google OAuth 2.0 to allow users to login without inventing an unique password
- Run the application on EC2, using Ubuntu 22.04.4 LTS system.
- Deploy MySQL to store and preserve data.
- Run Redis to cache data with faster speed instead of requeasting data to RDS everytime.
- Store photos of activities and personal profiles that users upload
- Display photos faster with CDN in AWS
- Create AWS account and launch EC2 instance of Ubuntu 22.04.4
- Allocate and associate elastic IP address
- Go to Security Groups in EC2 and set up inbound rules, which is opening the port 2000, 80, 443, 3306, 6379.
2000 is port of the web, 80 is port of HTTP, 443 is port of HTTPS, 3306 is port of RDS and 6379 is port of Redis. - Login EC2 and operate with Linux command line.
- The project needs to be run with .env file, so operator should ask authour for .env and put .env in a folder
- Install docker on EC2
sudo apt-get update
sudo apt install docker.io
sudo systemctl enable docker
sudo systemctl start docker
- Check whether docker could run successfully
sudo docker run hello-world
- Pull the docker image
sudo pull alemapnil/meetgather_f
- Go to the folder containing .env, run the project with docker image and open port 2000. Later you can see the web through URL, which is "elastic IP:2000"
sudo docker run -d -p2000:2000 --env-file .env alemapnil/meetgather_f
- Set up a domain name with elastic IP in A record
- Set up MX record and TXT record regarding email server, which is zoho.com. Ask authour about this
- Install nginx on EC2 and run
sudo apt update
sudo apt install nginx
sudo systemctl start nginx.service
- Check nginx status of operation
sudo systemctl status nginx
- Go to nginx.conf
sudo vim /etc/nginx/nginx.conf
- Amend nginx.conf with commenting out two lines in http{} and increasing server{} in it.
http{
# include /etc/nginx/conf.d/*.conf;
# include /etc/nginx/sites-enabled/*;
server{}
}
- Set up elastic IP and port in server{} well so that users could visit the web with domain name
server {
listen 80;
server_name meetgather.site;
client_max_body_size 4M;
location / {
proxy_pass http://elastic IP:2000/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Content-Security-Policy upgrade-insecure-requests;}
}
- Confirm whether configuration of nginx is correct
sudo nginx -t
- Start nginx again and you can visit web through domain name
sudo systemctl restart nginx
- Add SSL on domain name through Certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo apt-get install python3-certbot-nginx
sudo certbot --nginx