Updated README.md

This commit is contained in:
MarcUs7i 2025-04-02 12:03:41 +02:00
parent ddeffc2504
commit a4ff5216ef
2 changed files with 32 additions and 21 deletions

7
LICENSE Normal file
View file

@ -0,0 +1,7 @@
Copyright 2025 MarcUs7i
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,36 +1,43 @@
# uLinkShortener
This project is the code behind [u.marcus7i.net](https://u.marcus7i.net), a custom URL shortener. It uses Flask, MongoDB, and Docker for quick deployment.
This project is the code behind [u.marcus7i.net](https://u.marcus7i.net), a custom URL shortener. It uses Go, MongoDB, and Docker for quick deployment.
## Prerequisites
- Python
- Go
- 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>
PORT=<desired_port>
```
## Running Locally
1. Start MongoDB
2. Run:
### Without Docker
1. Install dependencies:
```
python server.py
go mod download
```
2. Build and run:
```
go run cmd/api/main.go
```
### With Docker
1. Build and run with docker compose:
```
docker-compose -f docker-compose-build.yml up --build
```
2. Use of pre-built image:
```
docker compose up -d
```
3. Access the app at http://localhost:5000
## Docker Deployment
1. Build and run containers:
@ -39,9 +46,6 @@ This project is the code behind [u.marcus7i.net](https://u.marcus7i.net), a cust
```
2. The application will be available at http://localhost:5000
## Using GHCR
## License
Pull the prebuilt image:
```bash
docker pull ghcr.io/MarcUs7i/ulinkshortener:latest
```
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.