-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev'. Bring gRPC, Organizer, folders to 'master'.
- Loading branch information
Showing
162 changed files
with
16,298 additions
and
6,635 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
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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release version with Debian packages | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Trigger the workflow on push tags like v1.0, v1.1, etc. | ||
|
||
jobs: | ||
build-debian-package: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build .deb files | ||
run: make debian-docker | ||
|
||
- name: Upload Debian Package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: debian-packages | ||
path: ./dist_deb/*.deb | ||
|
||
create-release: | ||
needs: build-debian-package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: debian-packages | ||
path: dist_deb | ||
|
||
- name: Create Release and Upload Assets | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh auth login --with-token <<< "${GITHUB_TOKEN}" | ||
gh release create "${{ github.ref_name }}" dist_deb/*.deb --draft --title "Release ${{ github.ref_name }}" --notes "Release ${{ github.ref_name }}" |
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 +1,2 @@ | ||
dist_deb/ | ||
.DS_Store |
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,4 +1,4 @@ | ||
{ | ||
"recommendations": [ "dbaeumer.vscode-eslint", "svelte.svelte-vscode", "dbaeumer.vscode-eslint", "ardenivanov.svelte-intellisense", | ||
"bradlc.vscode-tailwindcss", "rust-lang.rust-analyzer", "csstools.postcss", "ms-vscode-remote.remote-containers" ] | ||
"bradlc.vscode-tailwindcss", "csstools.postcss", "ms-vscode-remote.remote-containers" ] | ||
} |
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 @@ | ||
FROM node:18.16.0-bullseye-slim | ||
|
||
# Install system packages | ||
RUN apt-get -qy update >/dev/null | ||
RUN apt-get -qy install make protobuf-compiler >/dev/null | ||
|
||
ARG TARGET=dev | ||
RUN if [ "$TARGET" = "deb" ]; then apt-get -qy install make debhelper devscripts; fi >/dev/null | ||
|
||
# Create regular user | ||
|
||
ARG USER=docker | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN echo "#### USER=${USER}, UID=${UID}, GID=${GID}" | ||
RUN test -n "${USER}" && test -n "${UID}" && test -n "${GID} " | ||
|
||
RUN groupadd -f ${USER} --gid=${GID} | ||
RUN useradd -m ${USER} --uid=${UID} --gid=${GID} || true | ||
RUN mkdir -p /build/client | ||
RUN mkdir -p /build/protobuf/libs/typescript | ||
RUN chown -R ${UID}:${GID} /build | ||
|
||
WORKDIR /build/client | ||
USER ${UID}:${GID} | ||
|
||
COPY --chown=${UID}:${GID} client/package*.json ./ | ||
RUN npm install | ||
|
||
COPY --chown=${UID}:${GID} client /build/client | ||
COPY --chown=${UID}:${GID} protobuf/proto /build/protobuf/proto | ||
COPY --chown=${UID}:${GID} protobuf/libs/typescript /build/protobuf/libs/typescript | ||
|
||
WORKDIR /build/protobuf/libs/typescript | ||
RUN make | ||
WORKDIR /build/client | ||
RUN make build-local | ||
|
||
EXPOSE 5173 | ||
CMD ["make", "dev-local"] |
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
FROM debian:bookworm-slim AS python-bookworm-slim | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
debhelper \ | ||
dh-virtualenv \ | ||
dh-python \ | ||
python3 \ | ||
python3-dev \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
python3-venv \ | ||
libprotobuf-dev \ | ||
protobuf-compiler \ | ||
git \ | ||
; \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
# ---------------------------------- | ||
|
||
FROM python-bookworm-slim AS build | ||
|
||
# Install system packages | ||
RUN apt-get -qy update >/dev/null | ||
RUN apt-get -qy install make >/dev/null | ||
RUN apt-get -qy install sqlite3 >/dev/null | ||
|
||
# Build deps | ||
# RUN apt-get -qy install libssl-dev >/dev/null | ||
# RUN apt-get -qy install libsqlite3-dev >/dev/null | ||
RUN apt-get -qy install protobuf-compiler >/dev/null | ||
|
||
# Deb build deps | ||
RUN apt-get -qy install dh-virtualenv >/dev/null | ||
|
||
# Create regular user | ||
ARG USER=docker | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN echo "#### USER=${USER}, UID=${UID}, GID=${GID}" | ||
RUN test -n "${USER}" && test -n "${UID}" && test -n "${GID}" | ||
|
||
RUN groupadd -f ${USER} --gid=${GID} | ||
RUN useradd -m ${USER} --uid=${UID} --gid=${GID} || true | ||
RUN mkdir -p /build | ||
RUN chown -R ${UID}:${GID} /build | ||
|
||
USER ${UID}:${GID} | ||
RUN mkdir -p /build/organizer/basic_folders | ||
RUN mkdir -p /build/protobuf/libs/python | ||
|
||
# Copy sources | ||
COPY --chown=${UID}:${GID} protobuf/proto /build/protobuf/proto | ||
COPY --chown=${UID}:${GID} protobuf/libs/python /build/protobuf/libs/python | ||
COPY --chown=${UID}:${GID} organizer/basic_folders /build/organizer/basic_folders | ||
|
||
WORKDIR /build/organizer/basic_folders | ||
RUN ln -s ../ dist_deb |
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,80 @@ | ||
FROM rust:1.78-slim-bookworm AS rust-bookworm-slim | ||
|
||
# ---------------------------------- | ||
|
||
FROM rust-bookworm-slim AS chef | ||
|
||
# Create regular user | ||
ARG USER=docker | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN echo "#### USER=${USER}, UID=${UID}, GID=${GID}" | ||
RUN test -n "${USER}" && test -n "${UID}" && test -n "${GID}" | ||
|
||
RUN groupadd -f ${USER} --gid=${GID} | ||
RUN useradd -m ${USER} --uid=${UID} --gid=${GID} || true | ||
|
||
# Install cargo chef (Rust build cache for Docker) | ||
USER ${UID}:${GID} | ||
RUN cargo install cargo-chef | ||
RUN cargo install cargo-deb | ||
USER root | ||
|
||
# Install system packages | ||
RUN apt-get -qy update | ||
RUN apt-get -qy install acl sudo >/dev/null | ||
|
||
# Install system packages | ||
RUN apt-get -qy update >/dev/null | ||
RUN apt-get -qy install make >/dev/null | ||
RUN apt-get -qy install ffmpeg >/dev/null | ||
RUN apt-get -qy install mediainfo >/dev/null | ||
RUN apt-get -qy install mscgen >/dev/null | ||
RUN apt-get -qy install sqlite3 >/dev/null | ||
|
||
# Rust build deps | ||
RUN apt-get -qy install libssl-dev >/dev/null | ||
RUN apt-get -qy install libsqlite3-dev >/dev/null | ||
RUN apt-get -qy install protobuf-compiler >/dev/null | ||
|
||
# Switch to regular user | ||
RUN mkdir -p /app | ||
RUN chown -R ${UID}:${GID} /app | ||
USER ${UID}:${GID} | ||
|
||
# ---------------------------------- | ||
|
||
FROM chef AS planner | ||
|
||
RUN mkdir -p /app/server | ||
WORKDIR /app/server | ||
COPY --chown=${UID}:${GID} server/Cargo.toml . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
RUN mkdir -p /app/protobuf/libs/rust | ||
WORKDIR /app/protobuf/libs/rust | ||
COPY --chown=${UID}:${GID} ../protobuf/libs/rust/Cargo.toml . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
# ---------------------------------- | ||
|
||
FROM chef AS builder | ||
|
||
# Prebuild dependencies (build cache) | ||
WORKDIR /app/protobuf/libs/rust | ||
COPY --from=planner /app/protobuf/libs/rust/recipe.json ./ | ||
RUN cargo chef cook --recipe-path recipe.json | ||
|
||
WORKDIR /app/server | ||
COPY --from=planner /app/server/recipe.json ./ | ||
RUN cargo chef cook --recipe-path recipe.json | ||
|
||
# Copy dep sources | ||
COPY --chown=${UID}:${GID} protobuf/proto /app/protobuf/proto | ||
COPY --chown=${UID}:${GID} protobuf/libs/rust /app/protobuf/libs/rust | ||
COPY --chown=${UID}:${GID} server /app/server | ||
|
||
# -- config entrypoint -- | ||
WORKDIR /app/server | ||
EXPOSE 8095 | ||
CMD ["make", "run-local"] |
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
Oops, something went wrong.