Setting Up Docker Container


Experience with Docker, domains and web hosting is highly recommended for this method. Proceed only if you know what you are doing!

Prerequisites


  1. Docker

  2. Docker Compose


Getting Started


  1. Clone the repository

    git clone https://github.com/spoo-me/url-shortener.git
    
  2. Rename the .env.example file to .env

    mv .env.example .env
    
  3. Fill in the environment variables in the .env file with the values generated before

    MONGODB_URI=
    CONTACT_WEBHOOK=
    URL_REPORT_WEBHOOK=
    

    The MONGODB_URI, CONTACT_WEBHOOK, and URL_REPORT_WEBHOOK environment variables are sensitive and should not be shared with anyone. The values of these environment variables were generated in the previous steps. In this method, you can also set your MONGODB_URI to mongodb://mongo:27017.

  4. Modify the code base to your needs, like adding custom SEO, analytics, etc. in your favorite code editor.

  5. Build the Docker container

    docker-compose up --build
    
  6. Congratulations 🎉 your self-hosted url shortener is ready, access it at http://localhost:8000


Method 3
Manual Deployment