-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
209 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# compiled output | ||
.vscode | ||
|
||
# git | ||
.git/ | ||
.gitignore | ||
|
||
# docker | ||
Dockerfile | ||
docker-compose.yml | ||
|
||
# github | ||
.github/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# These are supported funding model platforms | ||
|
||
github: ru44 | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: ru44y | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
|
||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
|
||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: CI Workflow | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "**" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: cargo build --verbose | ||
# - name: Run tests | ||
# run: cargo test --verbose | ||
# env: | ||
# MONGO_URI: ${{secrets.MONGO_URI}} | ||
# MONGO_DB_NAME: ${{secrets.MONGO_DB_NAME}} | ||
# API_KEY: ${{secrets.API_KEY}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
|
||
# Added by cargo | ||
|
||
/target | ||
|
||
|
||
# env & config | ||
.env | ||
config.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "cliuno-rocket-template" | ||
version = "2.0.1" | ||
edition = "2021" | ||
authors = ["RuM <cliuno.github.io>"] | ||
description = "A template for a Rocket web server with CLIUno" | ||
license = "APGL-3.0" | ||
repository = "https://github.com/CLIuno/CLIuno-Rocket-template" | ||
|
||
[dependencies] | ||
rocket = "0.5.1" | ||
okapi = "0.7.0" | ||
dotenv = "0.15.0" | ||
futures = "0.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM rust:1.83-alpine as builder | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN cargo install --path . | ||
|
||
FROM alpine:3.9 as runner | ||
|
||
COPY --from=builder /usr/local/cargo/bin/cliuno-rocket-template /usr/local/bin/cliuno-rocket-template | ||
COPY --from=builder /app/.env .env | ||
COPY --from=builder /app/Rocket.toml Rocket.toml | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["cliuno-rocket-template"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[debug] | ||
# You should generate your own by "openssl rand -base64 32" | ||
secret_key = "" | ||
|
||
[release] | ||
address = "0.0.0.0" | ||
port = 8080 | ||
keep_alive = 5 | ||
read_timeout = 5 | ||
write_timeout = 5 | ||
log_level = "critical" | ||
secret_key = "" | ||
limits = { forms = 32768 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
The following versions of Cliuno are currently supported with security updates: | ||
|
||
| Version | Supported | | ||
| ------- | ------------------ | | ||
| 2.x | :white_check_mark: | | ||
| 1.x | :x: | | ||
|
||
## Reporting a Vulnerability | ||
|
||
To report a vulnerability in Cliuno , please follow these steps: | ||
|
||
1. make issue with label `security` in this repository | ||
2. Include as much information as possible to help us understand and reproduce the issue. | ||
3. You can expect an initial response within 48 hours of your report. | ||
4. We will keep you updated on the status of your report and any actions taken. | ||
5. If the vulnerability is accepted, we will work on a fix and release it as soon as possible. If declined, we will provide a detailed explanation. | ||
|
||
Thank you for helping us keep cliuno secure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#[macro_use] extern crate rocket; | ||
|
||
#[get("/")] | ||
fn index() -> &'static str { | ||
"Welcome To cliuno template Rocket Server!" | ||
} | ||
|
||
#[launch] | ||
fn rocket() -> _ { | ||
rocket::build().mount("/", routes![index]) | ||
} |