Skip to content

Instantly share code, notes, and snippets.

View FaridLU's full-sized avatar
🏠
Working from home

Farid Chowdhury FaridLU

🏠
Working from home
View GitHub Profile
@FaridLU
FaridLU / softether_vpn_server_client.md
Created August 14, 2023 09:17
Setup SoftEther VPN Server, SoftEther Remote Server Management Tool (in Windows / Mac), VPN Client

SoftEther VPN Server Setup

Follow the instructions below to setup OpenVPN and SoftEther Server Manager.

  1. Make sure you have a Linux server, which will be used as a VPN server.

  2. ssh into the server by the following command:

    $ ssh root@your_server_ip_address

@FaridLU
FaridLU / postgres_db_backup_scheduler.md
Last active August 24, 2023 12:06
automate_postgresql_scheduled_db_backup

Change from current user to root user

$ sudo -s

Now change to postgres user

$ su - postgres

Create a simple backup. (Optional, just for test)

Create Space in DigitalOcean and setup necessary keys and access point.

  1. Use the following link to create space: https://cloud.digitalocean.com/spaces/new
  2. Choose nearest region in the Region section.
  3. Check "Enable CDN" option to get fastest delivery of web assests.
  4. Now input a unique name relavent to your project in the "Bucket Name" section.
  5. Now create the space. This will take a couple of seconds to get the space created.
  6. Copy the Origin endpoint (in top right corner of the Space details page) and note it down somewhere else.

Create Access keys for DigitalOcean Space

@FaridLU
FaridLU / highly_scalable_django_backend.md
Last active April 28, 2023 11:49
Highly Scalable Django Backend (Docker + Kubernates)

Django Dockerfile

Sure, here's an example Dockerfile for building a Django project:

  # Use an official Python runtime as a parent image
  FROM python:3.8-slim-buster

  # Set the working directory to /app
 WORKDIR /app
@FaridLU
FaridLU / django_deployment.md
Last active April 29, 2024 15:25
Deploy Django project - Digital Ocean / AWS (EC2) - (Django + Redis + Gunicorn + Nginx + Supervisor + Lets Encrypt)

Login to your server via ssh

$ ssh root@server-ip-address

Initial Server Setup:

  1. Create a new user and set the password:
$ adduser ubuntu