Find a file
2025-04-02 08:37:01 +02:00
.github Rewritten in go 2025-04-02 08:37:01 +02:00
cmd/api Rewritten in go 2025-04-02 08:37:01 +02:00
internal Rewritten in go 2025-04-02 08:37:01 +02:00
web Rewritten in go 2025-04-02 08:37:01 +02:00
.dockerignore Initial commit 2025-02-21 01:23:57 +01:00
.env.example Rewritten in go 2025-04-02 08:37:01 +02:00
.gitignore Initial commit 2025-02-21 01:23:57 +01:00
docker-compose-build.yml Refactor Docker Compose configuration for uLinkShortener service and add separate build file 2025-02-25 00:05:06 +01:00
docker-compose.yml Fixed typo in docker-compose.yml 2025-02-25 00:06:03 +01:00
Dockerfile Rewritten in go 2025-04-02 08:37:01 +02:00
go.mod Rewritten in go 2025-04-02 08:37:01 +02:00
go.sum Rewritten in go 2025-04-02 08:37:01 +02:00
README.md Updated README.md 2025-02-21 02:11:54 +01:00
requirements.txt Initial commit 2025-02-21 01:23:57 +01:00
server.py Add PORT configuration to environment and update server to use it 2025-02-25 00:13:49 +01:00

uLinkShortener

This project is the code behind u.marcus7i.net, a custom URL shortener. It uses Flask, MongoDB, and Docker for quick deployment.

Prerequisites

  • Python
  • MongoDB database (local or remote)
  • Docker & Docker Compose (optional, for containerized deployments)

Setup

  1. Clone the repository
  2. Create a virtual environment (optional):
    python -m venv env
    source env/bin/activate  # Linux/Mac
    env\Scripts\activate     # Windows
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Define environment variables in the .env file:
    MONGO_URI=mongodb://<username>:<password>@<host>:<port>/<database>
    

Running Locally

  1. Start MongoDB
  2. Run:
    python server.py
    
  3. Access the app at http://localhost:5000

Docker Deployment

  1. Build and run containers:
    docker-compose up --build
    
  2. The application will be available at http://localhost:5000

Using GHCR

Pull the prebuilt image:

docker pull ghcr.io/MarcUs7i/ulinkshortener:latest