This project is based on python and django framework, so please install:
sudo apt install python3 python3-pip python3-venvFirst of all, clone this repository in your space:
git clone https://github.com/hwan3526/hanwooplz.git ~Set your Python virtual environment with venv:
python3 -m venv ~/hanwooplz/hanwooplz_envActivate generated venv and install all requiring packages:
cd ~/hanwooplz
. hanwooplz_env/bin/activate
pip3 install -r requirements.txtCopy your TinyMCE static folder into static folder:
cd ~/hanwooplz
chmod 744 tinymce_setup.sh
./tinymce_setup.shDo not forget create secrets.json in hanwooplz_project/hanwooplz_project directory
Please refer the following link: How to set PostgreSQL on AWS RDS
After creating and matching AWS RDS, run the following commands to create database:
cd ~/hanwooplz/hanwooplz_project
python3 manage.py makemigrations
python3 manage.py migrateRun the following command:
cd ~/hanwooplz/hanwooplz_project
python3 manage.py runserverYou can get into website on http://localhost:8000
Series: How to set AWS EC2 instance in addition to uWSGI and nginx How to apply SSL on AWS EC2 How to redirect HTTP requests to HTTPS
Even this is explained on the links above, after install uWSGI and nginx, you should copy configuration files and restart daemons:
sudo ln -f ~/hanwooplz/hanwooplz_project/hanwooplz_project/.config/uwsgi/uwsgi.service /etc/systemd/system/uwsgi.service
sudo systemctl daemon-reload
sudo systemctl enable uwsgi
sudo systemctl restart uwsgi
sudo cp -f ~/hanwooplz/hanwooplz_project/hanwooplz_project/.config/nginx/hanwooplz_project.conf /etc/nginx/sites-available/hanwooplz_project.conf
sudo ln -sf /etc/nginx/sites-available/hanwooplz_project.conf /etc/nginx/sites-enabled/hanwooplz_project.conf
sudo rm /etc/nginx/sites-enabled/default
sudo systemctl daemon-reload
sudo systemctl restart uwsgi nginxYou can set auto deployment by configuring GitHub Actions.
Please refer the below link to set auto deployment: How to set GitHub Actions