diff --git a/.gitea/workflows/builder.yaml b/.gitea/workflows/builder.yaml index ef4b620..c2c2ac4 100644 --- a/.gitea/workflows/builder.yaml +++ b/.gitea/workflows/builder.yaml @@ -3,7 +3,7 @@ name: ci on: push: branches: - - 'main' + - "main" jobs: build: @@ -23,7 +23,6 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - uses: mr-smithers-excellent/docker-build-push@v6 name: Build futureporn/bright with: @@ -32,4 +31,5 @@ jobs: registry: gitea.futureporn.net dockerfile: dockerfiles/bright.dockerfile username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file + password: ${{ secrets.DOCKER_PASSWORD }} + buildArgs: MIX_ENV=prod diff --git a/README.md b/README.md index afaed27..2663eea 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ![Tests Status](https://gitea.futureporn.net/futureporn/fp/actions/workflows/tests.yaml/badge.svg) ![Build Status](https://gitea.futureporn.net/futureporn/fp/actions/workflows/builder.yaml/badge.svg) +![Elixir](https://img.shields.io/badge/elixir-%234B275F.svg?style=for-the-badge&logo=elixir&logoColor=white) +![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white) [![Built with Devbox](https://www.jetify.com/img/devbox/shield_galaxy.svg)](https://www.jetify.com/devbox/docs/contributor-quickstart/) Source Code for https://futureporn.net diff --git a/apps/bright/lib/bright/tracker.ex b/apps/bright/lib/bright/tracker.ex index a087df0..16b07d1 100644 --- a/apps/bright/lib/bright/tracker.ex +++ b/apps/bright/lib/bright/tracker.ex @@ -100,12 +100,13 @@ defmodule Bright.Tracker do end def whitelist_info_hash(info_hash) do - Logger.debug("Attempting to whitelist info_hash=#{info_hash}") - whitelist_url = whitelist_url() username = whitelist_username() password = whitelist_password() - Logger.debug("whitelist_username=#{username} whitelist_password=#{password}") + + Logger.debug( + "Attempting to whitelist info_hash=#{info_hash}, whitelist_url=#{whitelist_url}, whitelist_username=#{username}, whitelist_password=#{password}" + ) send_whitelist_request(whitelist_url, info_hash, username, password) # case URI.parse(whitelist_url) do diff --git a/dockerfiles/bright.dockerfile b/dockerfiles/bright.dockerfile index 4d424be..90f5a9f 100644 --- a/dockerfiles/bright.dockerfile +++ b/dockerfiles/bright.dockerfile @@ -40,6 +40,7 @@ ARG MIX_ENV=test # Set it as an environment variable ENV MIX_ENV=${MIX_ENV} +RUN echo "Hello world! MIX_ENV=${MIX_ENV}" # install mix dependencies @@ -92,6 +93,7 @@ CMD [ "mix", "phx.server" ] # start a new build stage so that the final image will only contain # the compiled release and other runtime necessities FROM ${RUNNER_IMAGE} AS prod +RUN mkdir -p ~/.config/futureporn RUN apt-get update -y && \ apt-get install -y libstdc++6 openssl libncurses5 locales ca-certificates \ @@ -106,7 +108,7 @@ WORKDIR "/app" RUN chown nobody /app # set runner ENV -ARG MIX_ENV +ARG MIX_ENV=prod ENV MIX_ENV=$MIX_ENV RUN echo MIX_ENV=$MIX_ENV @@ -120,5 +122,4 @@ USER nobody # above and adding an entrypoint. See https://github.com/krallin/tini for details # ENTRYPOINT ["/tini", "--"] -RUN mkdir -p ~/.config/futureporn CMD ["/app/bin/server"] diff --git a/packages/do-nothing/publish.abs b/packages/do-nothing/publish.abs index f00123a..2fccc88 100644 --- a/packages/do-nothing/publish.abs +++ b/packages/do-nothing/publish.abs @@ -12,9 +12,11 @@ echo(" [Press Enter When Complete...]") _ = stdin() -echo(" * Generate a thumbnail -- ffmpeg -i ./projektmelody-chaturbate-2025-02-08.mp4 -vf 'select=not(mod(n\,45801)),scale=160:-1,tile=5x5' -vsync 0 ./projektmelody-chaturbate-2025-02-08-thumb.mp4") +echo(" * Generate a thumbnail -- bash <(curl -fsSL https://gitea.futureporn.net/futureporn/fp/raw/branch/main/packages/scripts/thumbnail-generator.sh) ./projektmelody-chaturbate-2025-02-12.mp4") echo(" * Upload the .mp4 to Mux ") echo(" * Upload the .mp4 to Backblaze ") +echo(" * Add the .mp4 to IPFS -- sudo -u ipfs ipfs add --cid-version=1 ./projektmelody-chaturbate-2025-02-12.mp4") +echo(" * Remote pin the IPFS CID") echo(" [Press Enter When Complete...]") _ = stdin()