Sign inSign up

daystram/cut

By daystram

•Updated about 5 years ago

Image
0

100K+

daystram/cut repository overview

⁠Cut

Gitlab Pipeline Status Docker Pulls MIT License

URL, snippet, and file sharing with ease. All content shared via Cut is ephemeral, only in-memory storage is used.

⁠Features

  • URL shortener
  • Snippet editor with code highlighter
  • Ephemeral file sharing
  • Set expiry to shared content (with 'Burn on Read')
  • Raw content endpoint (302 redirect, text response, or Content-Disposition download, respectively)

⁠Services

The application comes in two parts:

NameCode NameStack
Back-endcut-beRust⁠, Actix Web⁠, Redis⁠
Front-endcut-feTypeScript⁠, Vue.js⁠

⁠Develop

⁠cut-be

To ease development, cargo-watch⁠ is used to live-reload the application. Install the tool as documented.

To begin developing, simply enter the sub-directory and run the development server:

$ cd cut-be
$ cargo watch -x 'run'
⁠cut-fe

Populate .env.development with the required credentials.

To begin developing, simply enter the sub-directory and run the development server:

$ cd cut-fe
$ yarn
$ yarn serve

⁠Deploy

cut-be, and cut-fe are containerized and pushed to Docker Hub⁠. They are tagged based on their application name and version, e.g. daystram/cut:be or daystram/cut:be-v2.0.1.

To run cut-be, run the following:

$ docker run --name cut-be --env-file ./.env -p 8080:8080 -d daystram/cut:be

And cut-fe as follows:

$ docker run --name cut-fe -p 80:80 -d daystram/cut:fe
⁠Dependencies

The following are required for cut-be to function properly:

Their credentials must be provided in their respective services' configuration file.

⁠Docker Compose

For ease of deployment, the following docker-compose.yml file can be used to orchestrate the stack deployment:

version: "3"
services:
  cut-be:
    image: daystram/cut:be
    ports:
      - "8080:8080"
    env_file:
      - /path_to_env_file/.env
    restart: unless-stopped
  cut-fe:
    image: daystram/cut:fe
    ports:
      - "80:80"
    restart: unless-stopped
  redis:
    image: redis:6.0-alpine
    expose:
      - 6379
    volumes:
      - /path_to_redis_data:/data
    restart: unless-stopped

⁠License

This project is licensed under the MIT License⁠.

Tag summary

Content type

Image

Digest

Size

13.1 MB

Last updated

about 5 years ago

docker pull daystram/cut:be-v1.1.3