A simple article about deploying DevJournal to a VPS and making it available on the internet.
Deploying DevJournal to a VPS was an important step for this project.
Before deployment, the project worked only on a local computer. It was useful for development, but other people could not open the website from the internet.
A VPS helped solve this problem. A VPS is a virtual private server. It is a small server in the cloud. The project can run there all the time.
The first step was to create the server and connect to it with SSH. SSH is used to control the server from a terminal. It is important to use SSH keys, because they are safer than a simple password.
After that, the server needed basic setup. A new user was created, firewall rules were added, and root login was disabled. These steps help make the server safer.
Docker was used to run the project. Docker makes it easier to start the Django app and the PostgreSQL database in containers. This is useful because the setup is clear and repeatable.
Django was started with Gunicorn. Gunicorn is better for production than the Django development server. It receives requests and runs the Django application.
Nginx was added in front of Gunicorn. Nginx receives requests from the internet and sends them to Gunicorn. It also serves static and media files.
A domain name was connected to the server. This made the website easier to open. Instead of using only an IP address, users can open the project with a normal domain name.
HTTPS was also added. This makes the website more secure. The browser shows a lock icon, and the connection is protected.
The deployment process had many small steps. Some steps were not easy at first, but each part had a clear role.
Now DevJournal is not only a local project. It is a real website running on a VPS with Docker, PostgreSQL, Gunicorn, Nginx, a domain name, and HTTPS.