- Lightweight < 5MB
- Low RAM consumption
- Responsive UI
- Code coloring with syntect
- Automatic deletion after custom time
- Recovery of files raws
- GitHub actions
- Add code documentation
- Unit tests
- Docker image
Start by cloning the repo:
git clone https://github.com/Asthowen/AsthoBin.git && cd AsthoBinAfter that, create a PostgreSQL database with the name you want, then edit .env config file, for this please refer to configuration.
And finally, run Docker container:
docker run -d \
--name=asthobin \
-p 8080:8080 \
--restart unless-stopped \
--env-file .env \
asthowen/asthobin:latestYou can also use docker-compose with the docker/docker-compose.yml file.
Start by cloning the repo:
git clone https://github.com/Asthowen/AsthoBin.git && cd AsthoBinFor the next step you need to have Rust and Cargo installed on your PC, for that follow the official documentation. You will also need pnpm.
Now compile a release:
cargo build --releaseYour executable will be in the target/release/ folder, it is named asthobin.
To configure AsthoBin, just use the example configuration: .env.example, you just have to rename it to .env and complete it.
| Key | Default | Description |
|---|---|---|
| HOST | 127.0.0.1 | The desired hostname to launch AsthoBin. |
| PORT | 8080 | The desired port to launch AsthoBin. |
| DATABASE_URL | Nothing (required, unless DATABASE_URL_FILE is present) | The URL of your database. |
| DATABASE_URL_FILE | Nothing (required, unless DATABASE_URL is present) | Path to a file containing the URL of your database. |
| CORS_ORIGIN | * | CORS parameters. |
| DELETE_TIME | 604800 | Time (in seconds) for storing a bin. |
| LOG_ON_ACCESS | false | Display a log when a user access to a file. |
| LOG_ON_SAVE | false | Display a log when a user creates a file. |
| RATELIMIT_BETWEEN_SAVE | 2 | Number of seconds between each file save. |
| RATELIMIT_ALLOWED_BEFORE | 4 | Number of requests before blocking. |
| POOL_MAX_CONNECTIONS | Nothing (optionnal) | Maximum number of connections managed by the database pool. |
| POOL_MIN_RESERVED_CONNECTIONS | Nothing (optionnal) | Minimum idle connection count maintained by the database pool. |
| POOL_CONNECTION_TIMEOUT | Nothing (optionnal) | Connection timeout used by the database pool (in seconds). |
| TZ | System value | The time zone of the logger, e.g: Europe/Paris. |
You must make sure that clippy (cargo clippy) does not return any errors/warning. You must also run cargo fmt.
This project uses semantic versioning, which has the format: MAJOR.MINOR.PATCH with:
MAJORversion when you make incompatible API changes.MINORversion when you add functionality in a backwards compatible manner.PATCHversion when you make backwards compatible bug fixes.