mirror of
https://github.com/minoplhy/chhoto-url.git
synced 2024-11-22 17:26:45 +00: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:
parent
1f9cf1d777
commit
4a8385955b
@ -6,8 +6,8 @@ RUN rustup target add "$TARGET"
|
|||||||
|
|
||||||
RUN cargo install cargo-build-deps
|
RUN cargo install cargo-build-deps
|
||||||
|
|
||||||
RUN cargo new --bin simply-shorten
|
RUN cargo new --bin chhoto-url
|
||||||
WORKDIR /simply-shorten
|
WORKDIR /chhoto-url
|
||||||
|
|
||||||
RUN rustup target add x86_64-unknown-linux-musl
|
RUN rustup target add x86_64-unknown-linux-musl
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ RUN cargo build --release --locked --target "$TARGET"
|
|||||||
|
|
||||||
FROM scratch
|
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
|
COPY ./actix/resources /resources
|
||||||
|
|
||||||
CMD ["/simply-shorten"]
|
CMD ["/chhoto-url"]
|
||||||
|
18
README.md
18
README.md
@ -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)
|
[![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?
|
# What is it?
|
||||||
A simple selfhosted URL shortener with no unnecessary features.
|
A simple selfhosted URL shortener with no unnecessary features.
|
||||||
@ -68,7 +68,7 @@ place, resulting in possibly unwanted behavior.
|
|||||||
## Building from source
|
## Building from source
|
||||||
Clone this repository
|
Clone this repository
|
||||||
```
|
```
|
||||||
git clone https://github.com/SinTan1729/simply-shorten
|
git clone https://github.com/SinTan1729/chhoto-url
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Set environment variables
|
### 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
|
### `docker run` method
|
||||||
0. (Only if you really want to) Build the image
|
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
|
1. Run the image
|
||||||
```
|
```
|
||||||
docker run -p 4567:4567
|
docker run -p 4567:4567
|
||||||
-e password="password"
|
-e password="password"
|
||||||
-d simply-shorten:latest
|
-d chhoto-url:latest
|
||||||
```
|
```
|
||||||
1.a Make the database file available to host (optional)
|
1.a Make the database file available to host (optional)
|
||||||
```
|
```
|
||||||
@ -109,7 +109,7 @@ docker run -p 4567:4567 \
|
|||||||
-e password="password" \
|
-e password="password" \
|
||||||
-v ./urls.sqlite:/urls.sqlite \
|
-v ./urls.sqlite:/urls.sqlite \
|
||||||
-e db_url=/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)
|
1.b Further, set the URL of your website (optional)
|
||||||
```
|
```
|
||||||
@ -119,7 +119,7 @@ docker run -p 4567:4567 \
|
|||||||
-v ./urls.sqlite:/urls.sqlite \
|
-v ./urls.sqlite:/urls.sqlite \
|
||||||
-e db_url=/urls.sqlite \
|
-e db_url=/urls.sqlite \
|
||||||
-e site_url="https://www.example.com" \
|
-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
|
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.
|
that those links aren't created by you.
|
||||||
|
|
||||||
## Notes
|
## 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
|
- 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).
|
version of [this list used by docker](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go).
|
26
actix/Cargo.lock
generated
26
actix/Cargo.lock
generated
@ -453,6 +453,19 @@ version = "1.0.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "chhoto-url"
|
||||||
|
version = "4.4.0"
|
||||||
|
dependencies = [
|
||||||
|
"actix-files",
|
||||||
|
"actix-session",
|
||||||
|
"actix-web",
|
||||||
|
"env_logger",
|
||||||
|
"rand",
|
||||||
|
"regex",
|
||||||
|
"rusqlite",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cipher"
|
name = "cipher"
|
||||||
version = "0.4.4"
|
version = "0.4.4"
|
||||||
@ -1223,19 +1236,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "simply-shorten"
|
|
||||||
version = "4.4.0"
|
|
||||||
dependencies = [
|
|
||||||
"actix-files",
|
|
||||||
"actix-session",
|
|
||||||
"actix-web",
|
|
||||||
"env_logger",
|
|
||||||
"rand",
|
|
||||||
"regex",
|
|
||||||
"rusqlite",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "slab"
|
name = "slab"
|
||||||
version = "0.4.8"
|
version = "0.4.8"
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "simply-shorten"
|
name = "chhoto-url"
|
||||||
version = "4.4.0"
|
version = "4.4.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Sayantan Santra <sayantan[dot]santra689[at]gmail[dot]com"]
|
authors = ["Sayantan Santra <sayantan[dot]santra689[at]gmail[dot]com"]
|
||||||
license = "mit"
|
license = "mit"
|
||||||
description = "A simple selfhosted URL shortener with no unnecessary features."
|
description = "A simple selfhosted URL shortener with no unnecessary features."
|
||||||
homepage = "https://github.com/SinTan1729/simply-shorten"
|
homepage = "https://github.com/SinTan1729/chhoto-url"
|
||||||
documentation = "https://github.com/SinTan1729/simply-shorten"
|
documentation = "https://github.com/SinTan1729/chhoto-url"
|
||||||
repository = "https://github.com/SinTan1729/simply-shorten"
|
repository = "https://github.com/SinTan1729/chhoto-url"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = [
|
keywords = [
|
||||||
"docker",
|
"docker",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
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">
|
<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="description" content="A simple selfhosted URL shortener with no unnecessary features.">
|
||||||
<meta name="keywords" content="url shortener, link shortener, self hosted, open source">
|
<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">
|
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" sizes="any">
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<div class="container" id="container">
|
<div class="container" id="container">
|
||||||
<form class="pure-form pure-form-aligned" name="new-url-form">
|
<form class="pure-form pure-form-aligned" name="new-url-form">
|
||||||
<fieldset>
|
<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">
|
<div class="pure-control-group">
|
||||||
<label for="longUrl">Long URL</label>
|
<label for="longUrl">Long URL</label>
|
||||||
<input type="url" name="longUrl" id="longUrl" placeholder="Please enter a valid URL"
|
<input type="url" name="longUrl" id="longUrl" placeholder="Please enter a valid URL"
|
||||||
@ -63,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div name="github-link">
|
<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>
|
</div>
|
||||||
|
|
||||||
<dialog id="login-dialog">
|
<dialog id="login-dialog">
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
services:
|
services:
|
||||||
simply-shorten:
|
chhoto-url:
|
||||||
image: sintan1729/simply-shorten:latest
|
image: sintan1729/chhoto-url:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
container_name: simply-shorten
|
container_name: chhoto-url
|
||||||
ports:
|
ports:
|
||||||
- 4567:4567
|
- 4567:4567
|
||||||
environment:
|
environment:
|
||||||
|
Loading…
Reference in New Issue
Block a user