1
0
Fork 0
mirror of https://github.com/SinTan1729/chhoto-url synced 2024-12-25 23:28:37 -06:00

chg: Renamed the project

When starting out, I kept the name same as the original project.
But I think I've made significant changes, so keeping the name
same would be disingenuous.
This commit is contained in:
Sayantan Santra 2024-02-10 18:29:50 -06:00
parent 1f9cf1d777
commit 4a8385955b
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
6 changed files with 36 additions and 36 deletions

View file

@ -6,8 +6,8 @@ RUN rustup target add "$TARGET"
RUN cargo install cargo-build-deps
RUN cargo new --bin simply-shorten
WORKDIR /simply-shorten
RUN cargo new --bin chhoto-url
WORKDIR /chhoto-url
RUN rustup target add x86_64-unknown-linux-musl
@ -22,7 +22,7 @@ RUN cargo build --release --locked --target "$TARGET"
FROM scratch
COPY --from=build /simply-shorten/target/x86_64-unknown-linux-musl/release/simply-shorten /simply-shorten
COPY --from=build /chhoto-url/target/x86_64-unknown-linux-musl/release/chhoto-url /chhoto-url
COPY ./actix/resources /resources
CMD ["/simply-shorten"]
CMD ["/chhoto-url"]

View file

@ -1,8 +1,8 @@
[![docker-pulls](https://img.shields.io/docker/pulls/sintan1729/simply-shorten)](https://hub.docker.com/r/sintan1729/simply-shorten)
[![docker-pulls](https://img.shields.io/docker/pulls/sintan1729/chhoto-url)](https://hub.docker.com/r/sintan1729/chhoto-url)
[![maintainer](https://img.shields.io/badge/maintainer-SinTan1729-blue)](https://github.com/SinTan1729)
![commit-since-latest-release](https://img.shields.io/github/commits-since/SinTan1729/simply-shorten/latest?sort=semver&label=commits%20since%20latest%20release)
![commit-since-latest-release](https://img.shields.io/github/commits-since/SinTan1729/chhoto-url/latest?sort=semver&label=commits%20since%20latest%20release)
# ![Logo](actix/resources/assets/favicon-32.png) <span style="font-size:42px">Simply Shorten</span>
# ![Logo](actix/resources/assets/favicon-32.png) <span style="font-size:42px">Chhoto URL</span>
# What is it?
A simple selfhosted URL shortener with no unnecessary features.
@ -68,7 +68,7 @@ place, resulting in possibly unwanted behavior.
## Building from source
Clone this repository
```
git clone https://github.com/SinTan1729/simply-shorten
git clone https://github.com/SinTan1729/chhoto-url
```
### 2. Set environment variables
@ -94,13 +94,13 @@ You can optionally set the port the server listens on by appending `--port=[port
### `docker run` method
0. (Only if you really want to) Build the image
```
docker build . -t simply-shorten:latest
docker build . -t chhoto-url:latest
```
1. Run the image
```
docker run -p 4567:4567
-e password="password"
-d simply-shorten:latest
-d chhoto-url:latest
```
1.a Make the database file available to host (optional)
```
@ -109,7 +109,7 @@ docker run -p 4567:4567 \
-e password="password" \
-v ./urls.sqlite:/urls.sqlite \
-e db_url=/urls.sqlite \
-d simply-shorten:latest
-d chhoto-url:latest
```
1.b Further, set the URL of your website (optional)
```
@ -119,7 +119,7 @@ docker run -p 4567:4567 \
-v ./urls.sqlite:/urls.sqlite \
-e db_url=/urls.sqlite \
-e site_url="https://www.example.com" \
-d simply-shorten:latest
-d chhoto-url:latest
```
You can also set the redirect method to Permanent 308 (default) or Temporary 307 by setting
@ -135,6 +135,6 @@ pointing to illegal content. Since there are no logs, it's impossible to prove
that those links aren't created by you.
## Notes
- It started as a fork of [this project](https://gitlab.com/draganczukp/simply-shorten).
- It started as a fork of [this project](https://gitlab.com/draganczukp/chhoto-url).
- The list of adjectives and names used for random short url generation is a modified
version of [this list used by docker](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go).

26
actix/Cargo.lock generated
View file

@ -453,6 +453,19 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chhoto-url"
version = "4.4.0"
dependencies = [
"actix-files",
"actix-session",
"actix-web",
"env_logger",
"rand",
"regex",
"rusqlite",
]
[[package]]
name = "cipher"
version = "0.4.4"
@ -1223,19 +1236,6 @@ dependencies = [
"libc",
]
[[package]]
name = "simply-shorten"
version = "4.4.0"
dependencies = [
"actix-files",
"actix-session",
"actix-web",
"env_logger",
"rand",
"regex",
"rusqlite",
]
[[package]]
name = "slab"
version = "0.4.8"

View file

@ -1,13 +1,13 @@
[package]
name = "simply-shorten"
name = "chhoto-url"
version = "4.4.0"
edition = "2021"
authors = ["Sayantan Santra <sayantan[dot]santra689[at]gmail[dot]com"]
license = "mit"
description = "A simple selfhosted URL shortener with no unnecessary features."
homepage = "https://github.com/SinTan1729/simply-shorten"
documentation = "https://github.com/SinTan1729/simply-shorten"
repository = "https://github.com/SinTan1729/simply-shorten"
homepage = "https://github.com/SinTan1729/chhoto-url"
documentation = "https://github.com/SinTan1729/chhoto-url"
repository = "https://github.com/SinTan1729/chhoto-url"
readme = "README.md"
keywords = [
"docker",

View file

@ -7,7 +7,7 @@
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Simply Shorten</title>
<title>Chhoto URL</title>
<meta name="description" content="A simple selfhosted URL shortener with no unnecessary features.">
<meta name="keywords" content="url shortener, link shortener, self hosted, open source">
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" sizes="any">
@ -26,7 +26,7 @@
<div class="container" id="container">
<form class="pure-form pure-form-aligned" name="new-url-form">
<fieldset>
<legend id="logo"><img src="assets/favicon-32.png" width="26px" alt="logo"> Simply Shorten</legend>
<legend id="logo"><img src="assets/favicon-32.png" width="26px" alt="logo"> Chhoto URL</legend>
<div class="pure-control-group">
<label for="longUrl">Long URL</label>
<input type="url" name="longUrl" id="longUrl" placeholder="Please enter a valid URL"
@ -63,7 +63,7 @@
</div>
<div name="github-link">
<a href="https://github.com/SinTan1729/simply-shorten" target="_blank" rel="noopener noreferrer">Source Code</a>
<a href="https://github.com/SinTan1729/chhoto-url" target="_blank" rel="noopener noreferrer">Source Code</a>
</div>
<dialog id="login-dialog">

View file

@ -1,8 +1,8 @@
services:
simply-shorten:
image: sintan1729/simply-shorten:latest
chhoto-url:
image: sintan1729/chhoto-url:latest
restart: unless-stopped
container_name: simply-shorten
container_name: chhoto-url
ports:
- 4567:4567
environment: