rebaseded
authorpleroma <pleroma@plato.logografos.com>
Sun, 3 Sep 2023 06:39:40 +0000 (23:39 -0700)
committerpleroma <pleroma@plato.logografos.com>
Sun, 3 Sep 2023 06:39:40 +0000 (23:39 -0700)
Dockerfile [new file with mode: 0644]
ap [changed from file to symlink]
config/.prod.secret.exs.un~ [new file with mode: 0644]
docker-entrypoint.sh [new file with mode: 0755]
static/.robots.txt.un~ [new file with mode: 0755]
static/static/terms-of-service.html~ [new file with mode: 0755]

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..8c3ff3a
--- /dev/null
@@ -0,0 +1,56 @@
+ARG ELIXIR_VER=1.11.4
+ARG ERLANG_VER=24.2.1
+ARG ALPINE_VER=3.17.0
+
+FROM hexpm/elixir:${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER} as build
+
+COPY . .
+
+ENV MIX_ENV=prod
+
+RUN apk add git gcc g++ musl-dev make cmake file-dev &&\
+       echo "import Config" > config/prod.secret.exs &&\
+       mix local.hex --force &&\
+       mix local.rebar --force &&\
+       mix deps.get --only prod &&\
+       mkdir release &&\
+       mix release --path release
+
+FROM alpine:${ALPINE_VER}
+
+ARG BUILD_DATE
+ARG VCS_REF
+
+LABEL maintainer="ops@pleroma.social" \
+    org.opencontainers.image.title="pleroma" \
+    org.opencontainers.image.description="Pleroma for Docker" \
+    org.opencontainers.image.authors="ops@pleroma.social" \
+    org.opencontainers.image.vendor="pleroma.social" \
+    org.opencontainers.image.documentation="https://git.pleroma.social/pleroma/pleroma" \
+    org.opencontainers.image.licenses="AGPL-3.0" \
+    org.opencontainers.image.url="https://pleroma.social" \
+    org.opencontainers.image.revision=$VCS_REF \
+    org.opencontainers.image.created=$BUILD_DATE
+
+ARG HOME=/opt/pleroma
+ARG DATA=/var/lib/pleroma
+
+RUN apk update &&\
+       apk add exiftool ffmpeg imagemagick libmagic ncurses postgresql-client &&\
+       adduser --system --shell /bin/false --home ${HOME} pleroma &&\
+       mkdir -p ${DATA}/uploads &&\
+       mkdir -p ${DATA}/static &&\
+       chown -R pleroma ${DATA} &&\
+       mkdir -p /etc/pleroma &&\
+       chown -R pleroma /etc/pleroma
+
+USER pleroma
+
+COPY --from=build --chown=pleroma:0 /release ${HOME}
+
+COPY ./config/docker.exs /etc/pleroma/config.exs
+COPY ./docker-entrypoint.sh ${HOME}
+
+EXPOSE 4000
+
+ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"]
diff --git a/ap b/ap
deleted file mode 100644 (file)
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/ap b/ap
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..4b5268c09a088e786be5fa2fcda7daab893ab595
--- /dev/null
+++ b/ap
@@ -0,0 +1 @@
+/raid/servers/ap/
\ No newline at end of file
diff --git a/config/.prod.secret.exs.un~ b/config/.prod.secret.exs.un~
new file mode 100644 (file)
index 0000000..0b44d7f
Binary files /dev/null and b/config/.prod.secret.exs.un~ differ
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
new file mode 100755 (executable)
index 0000000..4691f68
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/ash
+
+set -e
+
+echo "-- Waiting for database..."
+while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-pleroma} -t 1; do
+    sleep 1s
+done
+
+echo "-- Running migrations..."
+$HOME/bin/pleroma_ctl migrate
+
+echo "-- Starting!"
+exec $HOME/bin/pleroma start
diff --git a/static/.robots.txt.un~ b/static/.robots.txt.un~
new file mode 100755 (executable)
index 0000000..6574351
Binary files /dev/null and b/static/.robots.txt.un~ differ
diff --git a/static/static/terms-of-service.html~ b/static/static/terms-of-service.html~
new file mode 100755 (executable)
index 0000000..c7d8fa6
--- /dev/null
@@ -0,0 +1 @@
+<h1>Terms of Service</h1><p>We do not block any instances.</p><p>Your allowed to say almost everything as long as its legal in the US(so no fed posts or loli).</p><p>@dcc is the BDFL of anni.</p><p>We are very moderated </p><p>Accounts with no public posts will be purged after one week</p>
\ No newline at end of file