-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
7fe679e
commit ee63374
Showing
16 changed files
with
1,167 additions
and
374 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,58 @@ | ||
|
||
name: 🐞 Bug report | ||
description: Create a report to help us improve | ||
labels: [bug] | ||
body: | ||
- type: input | ||
id: describe-the-bug | ||
attributes: | ||
label: Describe the bug | ||
description: | | ||
A clear and concise description of what the bug is. | ||
placeholder: | | ||
Example: "This provider is not working..." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reproduce-steps | ||
attributes: | ||
label: Steps to reproduce | ||
description: Provide an example of the issue. | ||
placeholder: | | ||
Example: | ||
1. First step | ||
2. Second step | ||
3. Issue here | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected-behavior | ||
attributes: | ||
label: Expected behavior | ||
placeholder: | | ||
Example: | ||
"This should happen..." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: actual-behavior | ||
attributes: | ||
label: Actual behavior | ||
placeholder: | | ||
Example: | ||
"This happened instead..." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional context | ||
description: | | ||
Add any other context about the problem here. | ||
placeholder: | | ||
Example: | ||
"Also ..." |
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,12 @@ | ||
contact_links: | ||
- name: 🍕 Provider Request | ||
url: https://github.com/consumet/extensions/issues/new?assignees=&labels=provider+request&template=provider-request.yml | ||
about: Request a new provider | ||
|
||
- name: 🙋 Question | ||
url: https://discord.gg/qTPfvMxzNH | ||
about: Ask your question or suggestion in Discord server | ||
|
||
- name: 🍔 Providers list | ||
url: https://consumet.org/extensions/list/ | ||
about: A list of the available providers |
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
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 |
---|---|---|
@@ -1,17 +1,23 @@ | ||
[package] | ||
name = "consumet-api" | ||
version = "0.1.0" | ||
version = "0.0.1" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
axum = { version = "0.6.19", features = ["macros"] } | ||
consumet-api-rs = "0.2.2" | ||
axum = { version = "0.7", features = ["macros", "http2", "json"] } | ||
consumet = "0.0.11" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0.68" | ||
tokio = { version = "1.0", features = ["full"] } | ||
tracing-subscriber = { version = "0.3", features = ["env-filter"] } | ||
dotenv = "0.15.0" | ||
tracing-subscriber = { version = "0.3.18", default-features = false, features = [ "env-filter", "fmt", "json" ] } | ||
time = { version = "0.3", features = [ "formatting" ] } | ||
tower = "0.4.13" | ||
tracing = "0.1.37" | ||
openssl = { version = "0.10.62", features = ["vendored"] } | ||
anyhow = "1.0.79" | ||
humantime-serde = "1.1.1" | ||
tower-http = { version = "0.5", features = [ "trace" ] } | ||
dotenv = "0.15.0" | ||
tracing-log = "0.2.0" |
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 |
---|---|---|
@@ -1,21 +1,42 @@ | ||
# Use the official Rust image as the base image | ||
FROM rust:latest | ||
FROM rust:latest AS builder | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /usr/src/consumet-api | ||
LABEL version="1.0.0" | ||
LABEL description="Consumet API (Axum) Docker Image" | ||
|
||
ARG PORT=3000 | ||
ENV PORT=${PORT} | ||
|
||
WORKDIR /app | ||
|
||
# Copy the Rust application's source code into the container | ||
COPY . . | ||
|
||
RUN rustup default nightly | ||
RUN \ | ||
--mount=type=cache,target=/app/target/ \ | ||
--mount=type=cache,target=/usr/local/cargo/registry/ \ | ||
cargo build --release && \ | ||
cp ./target/release/consumet-api / | ||
|
||
FROM debian:bookworm-slim AS final | ||
|
||
RUN adduser \ | ||
--disabled-password \ | ||
--gecos "" \ | ||
--home "/nonexistent" \ | ||
--shell "/sbin/nologin" \ | ||
--no-create-home \ | ||
--uid "10001" \ | ||
appuser | ||
|
||
COPY --from=builder /consumet-api /usr/local/bin | ||
|
||
RUN chown appuser /usr/local/bin/consumet-api | ||
|
||
USER appuser | ||
|
||
ENV PORT=8080 | ||
WORKDIR /usr/local/bin | ||
|
||
# Build the Rust application inside the container | ||
RUN cargo build --release | ||
ENV RUST_LOG=INFO | ||
|
||
# Expose any necessary ports (if your app requires it) | ||
EXPOSE 8080 | ||
EXPOSE ${PORT} | ||
|
||
# Specify the command to run your application (modify as needed) | ||
CMD ["./target/release/consumet-api"] | ||
ENTRYPOINT ["consumet-api"] |
Oops, something went wrong.