feat: initial commit
This commit is contained in:
commit
a7cad8493a
8 changed files with 80 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/target
|
||||
21
.woodpecker.yml
Normal file
21
.woodpecker.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
platform: linux/amd64
|
||||
|
||||
steps:
|
||||
build-image:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
platforms: linux/amd64
|
||||
repo: forge.lys.ee/lyssieth/rave
|
||||
secrets: [forge_username, forge_password]
|
||||
dockerfile: Dockerfile
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_SHA}
|
||||
push: true
|
||||
compress: true
|
||||
logins:
|
||||
- registry: forge.lys.ee
|
||||
username:
|
||||
from_secret: forge_username
|
||||
password:
|
||||
from_secret: forge_password
|
||||
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "rave"
|
||||
version = "0.1.0"
|
||||
9
Cargo.toml
Normal file
9
Cargo.toml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[package]
|
||||
name = "rave"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
publish = ["crates-io"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
29
Dockerfile
Normal file
29
Dockerfile
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# --- Build ---
|
||||
FROM clux/muslrust:latest AS build
|
||||
|
||||
COPY Cargo.toml Cargo.lock /volume/
|
||||
|
||||
RUN mkdir -p /volume/src && touch /volume/src/lib.rs
|
||||
|
||||
RUN cargo fetch --locked
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
RUN rm -rfv /volume/src/*.rs
|
||||
COPY . .
|
||||
|
||||
RUN rm -rfv /volume/target/*/release/rave
|
||||
RUN cargo build --release --features docker
|
||||
|
||||
RUN mv target/*-unknown-linux-musl/release/rave /tmp/rave
|
||||
|
||||
# --- Runtime ---
|
||||
FROM gcr.io/distroless/static AS runtime
|
||||
|
||||
COPY --from=build /tmp/rave /rave
|
||||
|
||||
VOLUME [ "/storage", "/config", "/cache" ]
|
||||
|
||||
ENV RUST_LOG=info
|
||||
|
||||
ENTRYPOINT ["/rave"]
|
||||
7
Justfile
Normal file
7
Justfile
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
set dotenv-load := false
|
||||
|
||||
build:
|
||||
docker buildx build --pull --platform linux/amd64 -t "forge.lys.ee/lyssieth/rave:amd64" --load .
|
||||
|
||||
run: build
|
||||
docker run -it -v ./data:/storage lyssieth/rave:latest
|
||||
3
README.md
Normal file
3
README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# `rave`
|
||||
|
||||
A basic bitch subsonic-compatible server thing written in Rust.
|
||||
3
src/main.rs
Normal file
3
src/main.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Loading…
Reference in a new issue