From ab4996cc727d7be02523497f56f81390d95ec989 Mon Sep 17 00:00:00 2001 From: STAM Date: Sun, 6 Aug 2023 21:57:55 +0300 Subject: [PATCH] ninjam ninjam --- ...rg.ecosysctem.freegpt.images.yml.disabled} | 0 .../epicmorg.ecosysctem.misc.images.yml | 17 +++ CHANGELOG.md | 3 + Makefile | 13 +-- .../freegpt-webui/1.0/Dockerfile | 0 .../freegpt-webui/1.0/Makefile | 0 .../freegpt-webui/1.0/docker-compose.yml | 0 .../1.0/etc/supervisor/conf.d/freegpt.conf | 0 .../freegpt-webui/1.1/Dockerfile | 0 .../freegpt-webui/1.1/Makefile | 0 .../freegpt-webui/1.1/docker-compose.yml | 0 .../1.1/etc/supervisor/conf.d/freegpt.conf | 0 .../freegpt-webui/1.2/Dockerfile | 0 .../freegpt-webui/1.2/Makefile | 0 .../freegpt-webui/1.2/docker-compose.yml | 0 .../1.2/etc/supervisor/conf.d/freegpt.conf | 0 .../freegpt-webui/1.3.1/Dockerfile | 0 .../freegpt-webui/1.3.1/Makefile | 0 .../freegpt-webui/1.3.1/docker-compose.yml | 0 .../1.3.1/etc/supervisor/conf.d/freegpt.conf | 0 .../freegpt-webui/1.3.2/Dockerfile | 0 .../freegpt-webui/1.3.2/Makefile | 0 .../freegpt-webui/1.3.2/docker-compose.yml | 0 .../1.3.2/etc/supervisor/conf.d/freegpt.conf | 0 .../freegpt-webui/1.3/Dockerfile | 0 .../freegpt-webui/1.3/Makefile | 0 .../freegpt-webui/1.3/docker-compose.yml | 0 .../1.3/etc/supervisor/conf.d/freegpt.conf | 0 .../freegpt-webui/1.4/Dockerfile | 0 .../freegpt-webui/1.4/Makefile | 0 .../freegpt-webui/1.4/docker-compose.yml | 0 .../1.4/etc/supervisor/conf.d/freegpt.conf | 0 .../freegpt-webui/README.md | 0 .../freegpt-webui/latest/Dockerfile | 0 .../freegpt-webui/latest/Makefile | 0 .../freegpt-webui/latest/docker-compose.yml | 0 .../latest/etc/supervisor/conf.d/freegpt.conf | 0 linux/ecosystem/ninjam/latest/Dockerfile | 61 ++++++++++ linux/ecosystem/ninjam/latest/Makefile | 19 +++ linux/ecosystem/ninjam/latest/README.md | 110 ++++++++++++++++++ .../ninjam/latest/docker-compose.yml | 6 + .../ninjam/latest/docker-entrypoint.sh | 19 +++ 42 files changed, 238 insertions(+), 10 deletions(-) rename .github/workflows/{epicmorg.ecosysctem.freegpt.images.yml => epicmorg.ecosysctem.freegpt.images.yml.disabled} (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.0/Dockerfile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.0/Makefile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.0/docker-compose.yml (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.0/etc/supervisor/conf.d/freegpt.conf (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.1/Dockerfile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.1/Makefile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.1/docker-compose.yml (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.1/etc/supervisor/conf.d/freegpt.conf (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.2/Dockerfile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.2/Makefile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.2/docker-compose.yml (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.2/etc/supervisor/conf.d/freegpt.conf (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3.1/Dockerfile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3.1/Makefile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3.1/docker-compose.yml (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3.1/etc/supervisor/conf.d/freegpt.conf (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3.2/Dockerfile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3.2/Makefile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3.2/docker-compose.yml (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3.2/etc/supervisor/conf.d/freegpt.conf (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3/Dockerfile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3/Makefile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3/docker-compose.yml (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.3/etc/supervisor/conf.d/freegpt.conf (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.4/Dockerfile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.4/Makefile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.4/docker-compose.yml (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/1.4/etc/supervisor/conf.d/freegpt.conf (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/README.md (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/latest/Dockerfile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/latest/Makefile (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/latest/docker-compose.yml (100%) rename linux/{ecosystem => discontinued}/freegpt-webui/latest/etc/supervisor/conf.d/freegpt.conf (100%) create mode 100644 linux/ecosystem/ninjam/latest/Dockerfile create mode 100644 linux/ecosystem/ninjam/latest/Makefile create mode 100644 linux/ecosystem/ninjam/latest/README.md create mode 100644 linux/ecosystem/ninjam/latest/docker-compose.yml create mode 100755 linux/ecosystem/ninjam/latest/docker-entrypoint.sh diff --git a/.github/workflows/epicmorg.ecosysctem.freegpt.images.yml b/.github/workflows/epicmorg.ecosysctem.freegpt.images.yml.disabled similarity index 100% rename from .github/workflows/epicmorg.ecosysctem.freegpt.images.yml rename to .github/workflows/epicmorg.ecosysctem.freegpt.images.yml.disabled diff --git a/.github/workflows/epicmorg.ecosysctem.misc.images.yml b/.github/workflows/epicmorg.ecosysctem.misc.images.yml index edce86e8f..b9e1ebe26 100644 --- a/.github/workflows/epicmorg.ecosysctem.misc.images.yml +++ b/.github/workflows/epicmorg.ecosysctem.misc.images.yml @@ -163,6 +163,23 @@ jobs: - name: Build and Deploy Monero p2pool run: cd linux/ecosystem/monero/p2pool && make build && make deploy +################################################################################## + + build-ninjam-image: + name: EpicMorg EcoSystem ninjam Image + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + - name: Log into registry + run: echo "${{ secrets.DOCKER_SERVER_KEY }}" | docker login -u "${{ secrets.DOCKER_SERVER_LOGIN }}" --password-stdin + + - name: Test Make + run: make + + - name: Build and Deploy ninjam + run: cd linux/ecosystem/ninjam/latest && make build && make deploy + ################################################################################## - name: Cleanup diff --git a/CHANGELOG.md b/CHANGELOG.md index 3457be44d..88a5e140d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog ## 2023 +* `aug` + * added `ninjam` server + * EOL of `freegpt` by closing project by maintaner - [Em1tSan/freegpt-webui-ru](https://github.com/Em1tSan/freegpt-webui-ru). * `july` * `android-sdk` images of `teqmcity agents` and `gitlab runners` updated * `grade` fixed inside containers diff --git a/Makefile b/Makefile index 43c2885f8..932b1ebdc 100644 --- a/Makefile +++ b/Makefile @@ -225,7 +225,7 @@ ecosystem-images: make ecosystem-gitlab-runner-images make ecosystem-nginx-images make ecosystem-vscode-server-images - make ecosystem-freegpt-webui-images + make ecosystem-ninjam-image advanced-pyhton-images: make advanced-pyhton-images-main @@ -589,15 +589,8 @@ ecosystem-nodejs-images: cd `pwd`/linux/ecosystem/nodejs/node19 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/nodejs/node20 && pwd && make build && make deploy -ecosystem-freegpt-webui-images: - cd `pwd`/linux/ecosystem/freegpt-webui/1.0 && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/freegpt-webui/1.1 && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/freegpt-webui/1.2 && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/freegpt-webui/1.3 && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/freegpt-webui/1.3.1 && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/freegpt-webui/1.3.2 && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/freegpt-webui/1.4 && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/freegpt-webui/latest && pwd && make build && make deploy +ecosystem-ninjam-image: + cd `pwd`/linux/ecosystem/ninjam/latest && pwd && make build && make deploy ecosystem-vk2discord-images: cd `pwd`/linux/ecosystem/vk2discord && pwd && make build && make deploy diff --git a/linux/ecosystem/freegpt-webui/1.0/Dockerfile b/linux/discontinued/freegpt-webui/1.0/Dockerfile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.0/Dockerfile rename to linux/discontinued/freegpt-webui/1.0/Dockerfile diff --git a/linux/ecosystem/freegpt-webui/1.0/Makefile b/linux/discontinued/freegpt-webui/1.0/Makefile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.0/Makefile rename to linux/discontinued/freegpt-webui/1.0/Makefile diff --git a/linux/ecosystem/freegpt-webui/1.0/docker-compose.yml b/linux/discontinued/freegpt-webui/1.0/docker-compose.yml similarity index 100% rename from linux/ecosystem/freegpt-webui/1.0/docker-compose.yml rename to linux/discontinued/freegpt-webui/1.0/docker-compose.yml diff --git a/linux/ecosystem/freegpt-webui/1.0/etc/supervisor/conf.d/freegpt.conf b/linux/discontinued/freegpt-webui/1.0/etc/supervisor/conf.d/freegpt.conf similarity index 100% rename from linux/ecosystem/freegpt-webui/1.0/etc/supervisor/conf.d/freegpt.conf rename to linux/discontinued/freegpt-webui/1.0/etc/supervisor/conf.d/freegpt.conf diff --git a/linux/ecosystem/freegpt-webui/1.1/Dockerfile b/linux/discontinued/freegpt-webui/1.1/Dockerfile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.1/Dockerfile rename to linux/discontinued/freegpt-webui/1.1/Dockerfile diff --git a/linux/ecosystem/freegpt-webui/1.1/Makefile b/linux/discontinued/freegpt-webui/1.1/Makefile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.1/Makefile rename to linux/discontinued/freegpt-webui/1.1/Makefile diff --git a/linux/ecosystem/freegpt-webui/1.1/docker-compose.yml b/linux/discontinued/freegpt-webui/1.1/docker-compose.yml similarity index 100% rename from linux/ecosystem/freegpt-webui/1.1/docker-compose.yml rename to linux/discontinued/freegpt-webui/1.1/docker-compose.yml diff --git a/linux/ecosystem/freegpt-webui/1.1/etc/supervisor/conf.d/freegpt.conf b/linux/discontinued/freegpt-webui/1.1/etc/supervisor/conf.d/freegpt.conf similarity index 100% rename from linux/ecosystem/freegpt-webui/1.1/etc/supervisor/conf.d/freegpt.conf rename to linux/discontinued/freegpt-webui/1.1/etc/supervisor/conf.d/freegpt.conf diff --git a/linux/ecosystem/freegpt-webui/1.2/Dockerfile b/linux/discontinued/freegpt-webui/1.2/Dockerfile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.2/Dockerfile rename to linux/discontinued/freegpt-webui/1.2/Dockerfile diff --git a/linux/ecosystem/freegpt-webui/1.2/Makefile b/linux/discontinued/freegpt-webui/1.2/Makefile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.2/Makefile rename to linux/discontinued/freegpt-webui/1.2/Makefile diff --git a/linux/ecosystem/freegpt-webui/1.2/docker-compose.yml b/linux/discontinued/freegpt-webui/1.2/docker-compose.yml similarity index 100% rename from linux/ecosystem/freegpt-webui/1.2/docker-compose.yml rename to linux/discontinued/freegpt-webui/1.2/docker-compose.yml diff --git a/linux/ecosystem/freegpt-webui/1.2/etc/supervisor/conf.d/freegpt.conf b/linux/discontinued/freegpt-webui/1.2/etc/supervisor/conf.d/freegpt.conf similarity index 100% rename from linux/ecosystem/freegpt-webui/1.2/etc/supervisor/conf.d/freegpt.conf rename to linux/discontinued/freegpt-webui/1.2/etc/supervisor/conf.d/freegpt.conf diff --git a/linux/ecosystem/freegpt-webui/1.3.1/Dockerfile b/linux/discontinued/freegpt-webui/1.3.1/Dockerfile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3.1/Dockerfile rename to linux/discontinued/freegpt-webui/1.3.1/Dockerfile diff --git a/linux/ecosystem/freegpt-webui/1.3.1/Makefile b/linux/discontinued/freegpt-webui/1.3.1/Makefile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3.1/Makefile rename to linux/discontinued/freegpt-webui/1.3.1/Makefile diff --git a/linux/ecosystem/freegpt-webui/1.3.1/docker-compose.yml b/linux/discontinued/freegpt-webui/1.3.1/docker-compose.yml similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3.1/docker-compose.yml rename to linux/discontinued/freegpt-webui/1.3.1/docker-compose.yml diff --git a/linux/ecosystem/freegpt-webui/1.3.1/etc/supervisor/conf.d/freegpt.conf b/linux/discontinued/freegpt-webui/1.3.1/etc/supervisor/conf.d/freegpt.conf similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3.1/etc/supervisor/conf.d/freegpt.conf rename to linux/discontinued/freegpt-webui/1.3.1/etc/supervisor/conf.d/freegpt.conf diff --git a/linux/ecosystem/freegpt-webui/1.3.2/Dockerfile b/linux/discontinued/freegpt-webui/1.3.2/Dockerfile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3.2/Dockerfile rename to linux/discontinued/freegpt-webui/1.3.2/Dockerfile diff --git a/linux/ecosystem/freegpt-webui/1.3.2/Makefile b/linux/discontinued/freegpt-webui/1.3.2/Makefile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3.2/Makefile rename to linux/discontinued/freegpt-webui/1.3.2/Makefile diff --git a/linux/ecosystem/freegpt-webui/1.3.2/docker-compose.yml b/linux/discontinued/freegpt-webui/1.3.2/docker-compose.yml similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3.2/docker-compose.yml rename to linux/discontinued/freegpt-webui/1.3.2/docker-compose.yml diff --git a/linux/ecosystem/freegpt-webui/1.3.2/etc/supervisor/conf.d/freegpt.conf b/linux/discontinued/freegpt-webui/1.3.2/etc/supervisor/conf.d/freegpt.conf similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3.2/etc/supervisor/conf.d/freegpt.conf rename to linux/discontinued/freegpt-webui/1.3.2/etc/supervisor/conf.d/freegpt.conf diff --git a/linux/ecosystem/freegpt-webui/1.3/Dockerfile b/linux/discontinued/freegpt-webui/1.3/Dockerfile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3/Dockerfile rename to linux/discontinued/freegpt-webui/1.3/Dockerfile diff --git a/linux/ecosystem/freegpt-webui/1.3/Makefile b/linux/discontinued/freegpt-webui/1.3/Makefile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3/Makefile rename to linux/discontinued/freegpt-webui/1.3/Makefile diff --git a/linux/ecosystem/freegpt-webui/1.3/docker-compose.yml b/linux/discontinued/freegpt-webui/1.3/docker-compose.yml similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3/docker-compose.yml rename to linux/discontinued/freegpt-webui/1.3/docker-compose.yml diff --git a/linux/ecosystem/freegpt-webui/1.3/etc/supervisor/conf.d/freegpt.conf b/linux/discontinued/freegpt-webui/1.3/etc/supervisor/conf.d/freegpt.conf similarity index 100% rename from linux/ecosystem/freegpt-webui/1.3/etc/supervisor/conf.d/freegpt.conf rename to linux/discontinued/freegpt-webui/1.3/etc/supervisor/conf.d/freegpt.conf diff --git a/linux/ecosystem/freegpt-webui/1.4/Dockerfile b/linux/discontinued/freegpt-webui/1.4/Dockerfile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.4/Dockerfile rename to linux/discontinued/freegpt-webui/1.4/Dockerfile diff --git a/linux/ecosystem/freegpt-webui/1.4/Makefile b/linux/discontinued/freegpt-webui/1.4/Makefile similarity index 100% rename from linux/ecosystem/freegpt-webui/1.4/Makefile rename to linux/discontinued/freegpt-webui/1.4/Makefile diff --git a/linux/ecosystem/freegpt-webui/1.4/docker-compose.yml b/linux/discontinued/freegpt-webui/1.4/docker-compose.yml similarity index 100% rename from linux/ecosystem/freegpt-webui/1.4/docker-compose.yml rename to linux/discontinued/freegpt-webui/1.4/docker-compose.yml diff --git a/linux/ecosystem/freegpt-webui/1.4/etc/supervisor/conf.d/freegpt.conf b/linux/discontinued/freegpt-webui/1.4/etc/supervisor/conf.d/freegpt.conf similarity index 100% rename from linux/ecosystem/freegpt-webui/1.4/etc/supervisor/conf.d/freegpt.conf rename to linux/discontinued/freegpt-webui/1.4/etc/supervisor/conf.d/freegpt.conf diff --git a/linux/ecosystem/freegpt-webui/README.md b/linux/discontinued/freegpt-webui/README.md similarity index 100% rename from linux/ecosystem/freegpt-webui/README.md rename to linux/discontinued/freegpt-webui/README.md diff --git a/linux/ecosystem/freegpt-webui/latest/Dockerfile b/linux/discontinued/freegpt-webui/latest/Dockerfile similarity index 100% rename from linux/ecosystem/freegpt-webui/latest/Dockerfile rename to linux/discontinued/freegpt-webui/latest/Dockerfile diff --git a/linux/ecosystem/freegpt-webui/latest/Makefile b/linux/discontinued/freegpt-webui/latest/Makefile similarity index 100% rename from linux/ecosystem/freegpt-webui/latest/Makefile rename to linux/discontinued/freegpt-webui/latest/Makefile diff --git a/linux/ecosystem/freegpt-webui/latest/docker-compose.yml b/linux/discontinued/freegpt-webui/latest/docker-compose.yml similarity index 100% rename from linux/ecosystem/freegpt-webui/latest/docker-compose.yml rename to linux/discontinued/freegpt-webui/latest/docker-compose.yml diff --git a/linux/ecosystem/freegpt-webui/latest/etc/supervisor/conf.d/freegpt.conf b/linux/discontinued/freegpt-webui/latest/etc/supervisor/conf.d/freegpt.conf similarity index 100% rename from linux/ecosystem/freegpt-webui/latest/etc/supervisor/conf.d/freegpt.conf rename to linux/discontinued/freegpt-webui/latest/etc/supervisor/conf.d/freegpt.conf diff --git a/linux/ecosystem/ninjam/latest/Dockerfile b/linux/ecosystem/ninjam/latest/Dockerfile new file mode 100644 index 000000000..a97b079bd --- /dev/null +++ b/linux/ecosystem/ninjam/latest/Dockerfile @@ -0,0 +1,61 @@ +FROM epicmorg/debian:bookworm-develop as builder + +RUN git clone https://www-dev.cockos.com/ninjam/ninjam.git /tmp/ninjam && \ + cd /tmp/ninjam/ninjam/server && \ + make && \ + dos2unix *.cfg && \ + dos2unix *.txt + +FROM epicmorg/debian:bookworm +LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# Setup +################################################################## +ENV NINJAM_CONFIG=config.cfg +ENV NINJAM_PORT=2049 +ENV NINJAM_UID=1337 +ENV NINJAM_DIR=/app +ENV NINJAM_BIN=${NINJAM_DIR}/bin +ENV NINJAM_ARCHIVE=${NINJAM_DIR}/archive +ENV NINJAM_LOG=${NINJAM_DIR}/log +ENV NINJAM_RUN=${NINJAM_DIR}/run +ENV NINJAM_LOGFILE=${NINJAM_LOG}/ninjamserver.log +ENV NINJAM_PID=${NINJAM_RUN}/ninjamserver.pid + +RUN mkdir -p ${NINJAM_DIR} ${NINJAM_LOG} ${NINJAM_ARCHIVE} ${NINJAM_RUN} ${NINJAM_BIN} + +ENV PATH="${PATH}:${NINJAM_BIN}" + +COPY --from=builder /tmp/ninjam/ninjam/server/ninjamsrv ${NINJAM_BIN}/ninjamsrv +COPY --from=builder /tmp/ninjam/ninjam/server/example.cfg ${NINJAM_BIN}/example.cfg +COPY --from=builder /tmp/ninjam/ninjam/server/license.txt ${NINJAM_BIN}/license.txt +COPY --from=builder /tmp/ninjam/ninjam/server/cclicense.txt ${NINJAM_BIN}/cclicense.txt + +################################################################## +# cleaninig up +################################################################## +RUN apt clean -y && \ + apt-get clean all && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +VOLUME ${NINJAM_LOG} ${NINJAM_ARCHIVE} + +# Add image configuration and scripts +COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh +RUN chmod 755 /usr/bin/docker-entrypoint.sh +RUN chmod 755 ${NINJAM_BIN}/ninjamsrv + +#Final config +EXPOSE ${NINJAM_PORT} ${NINJAM_PORT}/udp + +WORKDIR ${NINJAM_BIN} + +ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] +CMD ["docker-entrypoint.sh"] + +#ENTRYPOINT ${NINJAM_BIN}/ninjamsrv ${NINJAM_CONFIG} -port ${NINJAM_PORT} -setuid ${NINJAM_UID} -archive ${NINJAM_ARCHIVE} -logfile ${NINJAM_LOGFILE} -pidfile ${NINJAM_PID} diff --git a/linux/ecosystem/ninjam/latest/Makefile b/linux/ecosystem/ninjam/latest/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/ninjam/latest/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/ninjam/latest/README.md b/linux/ecosystem/ninjam/latest/README.md new file mode 100644 index 000000000..eb85c8dc0 --- /dev/null +++ b/linux/ecosystem/ninjam/latest/README.md @@ -0,0 +1,110 @@ +# Compose example + +```yml +services: + ninjam: + hostname: ninjam + container_name: ninjam + image: "epicmorg/ninjam:latest" + restart: always + ports: + - "1234:1234" + - "1234:1234/udp" + volumes: + - /etc/localtime:/etc/localtime + - /etc/timezone:/etc/timezone + - logs:/app/log:rw #log file folder + - archive:/app/archive:rw #archive folder + - /some/place/config.cfg:/app/bin/config.cfg #binded config.cfg with custom settings + - /some/place/motd.txt:/app/bin/motd.txt #binded motd.txt with custom welcome screen + - /some/place/mylicense.txt:/app/bin/mylicense.txt #binded license.txt with custom license screen + environment: + NINJAM_PORT: 1234 + NINJAM_CONFIG: config.cfg + tmpfs: + - /tmp +volumes: + logs: + external: true + archive: + external: true +``` + +# ENV Defaults + +```bash +ENV NINJAM_CONFIG=config.cfg +ENV NINJAM_PORT=2049 +ENV NINJAM_UID=1337 +ENV NINJAM_DIR=/app +ENV NINJAM_BIN=${NINJAM_DIR}/bin +ENV NINJAM_ARCHIVE=${NINJAM_DIR}/archive +ENV NINJAM_LOG=${NINJAM_DIR}/log +ENV NINJAM_RUN=${NINJAM_DIR}/run +ENV NINJAM_LOGFILE=${NINJAM_LOG}/ninjamserver.log +ENV NINJAM_PID=${NINJAM_RUN}/ninjamserver.pid +`````` + +## What is NINJAM? +NINJAM is open source (GPL) software to allow people to make real music together via the Internet. Every participant can hear every other participant. Each user can also tweak their personal mix to his or her liking. NINJAM is cross-platform, with clients available for macOS, Linux, and Windows. REAPER (our digital audio workstation software) also includes NINJAM support (ReaNINJAM plug-in). +NINJAM uses compressed audio which allows it to work with any instrument or combination of instruments. You can sing, play a real piano, play a real saxophone, play a real guitar with whatever effects and guitar amplifier you want, anything. If your computer can record it, then you can jam with it (as opposed to MIDI-only systems that automatically preclude any kind of natural audio collaboration1). + +Since the inherent latency of the Internet prevents true realtime synchronization of the jam2, and playing with latency is weird (and often uncomfortable), NINJAM provides a solution by making latency (and the weirdness) much longer. + +Latency in NINJAM is measured in measures, and that's what makes it interesting. + +The NINJAM client records and streams synchronized intervals of music between participants. Just as the interval finishes recording, it begins playing on everyone else's client. So when you play through an interval, you're playing along with the previous interval of everybody else, and they're playing along with your previous interval. If this sounds pretty bizarre, it sort of is, until you get used to it, then it becomes pretty natural. In many ways, it can be more forgiving than a normal jam, because mistakes propagate differently. + +Part tool, part toy, NINJAM is designed with an emphasis on musical experimentation and expression. + +## How does NINJAM work? + +NINJAM uses OGG Vorbis audio compression to compress audio, then streams it to a NINJAM server, which can then stream it to the other people in your jam. This architecture requires a server with adequate bandwidth, but has no firewall or NAT issues. OGG Vorbis is utilized for its great low bitrate characteristics and performance. Each user receives a copy of other users audio streams, allowing for each user to adjust the mix to their liking, as well as remix later. This uses more bandwidth than having a server encode a single stream, but has numerous benefits (including lower server CPU use and the client having the full multichannel data for later use). +NINJAM can also save all of the original uncompressed source material, for doing full quality remixes after the jam. + + +(1): While MIDI has many wonderful uses, it also has substantial limitations when working with real instruments. +(2): Limitations of note: sound hardware latency (>5ms), perceptual CODEC latency (>20ms), plus typical and theoretical network latency (>40ms). + +## NINJAM Server: +The main requirement for running the server is outbound bandwidth. For example, a 4 person jam needs approximately 768kbps of outbound (and only 240kbps inbound) bandwidth, and a 8 person jam requires approximately 3mbps of outbound (and 600kbps inbound) bandwidth. + +## NINJAM server setup guide +To set up a NINJAM server, first find a host that has an abundance of outbound bandwidth. Or if you want to use NINJAM on a LAN with all of the hosts local, that is an option as well. The server can currently run on Windows, OS X, Linux, and FreeBSD. To download the server for your platform, see the download page. +To install the server, extract the archive (or copy the contents of the .dmg if on a mac) to a directory, then edit the example configuration file to suit your needs. Here is a list of the configuration items and what they mean: + +Port n - port for server to listen on. The default is 2049. +ServerLicense filename.txt - forces users to view and agree to the license provided to connect. This is useful if you want to run a public server and make people who contribute to a jam license their parts under a Creative Commons or similar license (or whatever license you choose) +MaxUsers n - maximum number of users allowed. +MaxChannels n n - set the maximum channels per user for normal (first parameter) and anonymous (second parameter) users. +SetLog filename - logs to file named "filename". If not specified, logs to standard output. +SessionArchive path interval - if set, archives all recordings to the path provided, and creates a new subdirectory every "interval" minutes. If interval is 0, the interval is 30 seconds. +DefaultTopic topic - default server topic. +DefaultBPM bpm - default server BPM (range 20 to 400) +DefaultBPI bpi - default server BPI (range 2 to 1024) +AnonymousUsers yes|no|multi - allow users to log in anonymously (if no, only users with a valid login/password will be allowed). If multi is specified, then multiple anonymous users from the same IP with the same nickname can log in. +AnonymousUsersCanChat yes|no - allow anonymous users to send chat messages (if no, they can play, but can't contribute to the chat) +AnonymousMaskIP yes|no - if yes, mask the last number in anonymous users' addresses. +AllowHiddenUsers yes|no - if no, users without any channels will appear in the user list. otherwise, they will not. +User username password [permissions] - This adds an authorized user to the user list. If permissions are specified, the default permissions are overridden. Specify * for all access, or include any combination of the following to enable them: + +``` +C - allow this user to chat with other users +T - allow this user to set the server topic +B - allow this user to adjust BPM / BPI of server +K - allow this user to kick other people +R - allow this user to log in even when server is full +M - allow this user to log in multiple times +``` + +ACL mask allow|deny|reserve - This adds an entry to the Access Control List (ACL). The configuration file can have any number of these, and the first match is used. mask is in the format of x.x.x.x/y, i.e. 192.168.0.0/16 or 66.88.120.240/28. allow specifies to allow connections, deny specifies to not, and reserve specifies to always allow (even if there are too many users connected). +SetKeepAlive n - sets connection keepalive time to "n" seconds. Recommended value is 3. +SetPID filename - writes process PID to "filename". Only valid on non-Windows systems. + + +Once you've set the configuration the way you think you will like it, you can run the server: +On OS X/Linux/FreeBSD (OS X will require you to open a terminal and go to the proper directory): +./ninjamsrv configfilename.cfg +On Windows (after opening a command line, and going to the proper directory): +ninjamsrv configfilename.cfg +If you need ot change the configuration once the server is running, you can restart it by hitting R (on Windows), or by using the command "killall -HUP ninjamsrv" (on Linux/FreeBSD/OS X). \ No newline at end of file diff --git a/linux/ecosystem/ninjam/latest/docker-compose.yml b/linux/ecosystem/ninjam/latest/docker-compose.yml new file mode 100644 index 000000000..3111781c7 --- /dev/null +++ b/linux/ecosystem/ninjam/latest/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3.9' +services: + app: + image: "epicmorg/ninjam:latest" + build: + context: . diff --git a/linux/ecosystem/ninjam/latest/docker-entrypoint.sh b/linux/ecosystem/ninjam/latest/docker-entrypoint.sh new file mode 100755 index 000000000..6fb693963 --- /dev/null +++ b/linux/ecosystem/ninjam/latest/docker-entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -euo pipefail + +# Setup default Opts +: ${NINJAM_CONFIG:=example.cfg} +: ${NINJAM_PORT:=2049} +: ${NINJAM_UID:=1337} +: ${NINJAM_ARCHIVE:=/app/archive} +: ${NINJAM_LOG:=/app/log} +: ${NINJAM_RUN:=/app/run} +: ${NINJAM_LOGFILE:=${NINJAM_LOG}/ninjamserver.log} +: ${NINJAM_PID:=${NINJAM_RUN}/ninjamserver.pid} + +echo "======================================================" +echo "[NINJAM] Starting NINJAM Server..." +echo "======================================================" + +cd ${NINJAM_BIN} +${NINJAM_BIN}/ninjamsrv ${NINJAM_CONFIG} -port ${NINJAM_PORT} -setuid ${NINJAM_UID} -archive ${NINJAM_ARCHIVE} -logfile ${NINJAM_LOGFILE} -pidfile ${NINJAM_PID}