fix
This commit is contained in:
parent
44ca354475
commit
3e99025879
@ -1,11 +1,10 @@
|
||||
FROM alpine:3.16
|
||||
RUN apk update;apk upgrade;apk add bash exiftool libmagic ncurses-libs musl sudo bash curl nginx unzip postgresql postgresql-contrib certbot busybox imagemagick ffmpeg certbot tzdata openssl ncurses
|
||||
|
||||
WORKDIR /tmp
|
||||
FROM docker.io/debian:stable
|
||||
RUN apt update;apt install -y curl unzip libncurses5 postgresql postgresql-contrib nginx certbot libmagic-dev imagemagick ffmpeg exiftool nginx build-essential cron wget procps
|
||||
WORKDIR /tm
|
||||
ENV SHELL="/bin/bash"
|
||||
ENV FLAVOUR="amd64-musl"
|
||||
ENV FLAVOUR="amd64"
|
||||
|
||||
RUN adduser --system --shell /bin/false --home /opt/akkoma akkoma
|
||||
RUN useradd -r -s /bin/false -m -d /var/lib/akkoma -U akkoma
|
||||
|
||||
WORKDIR /tmp
|
||||
#RUN su pleroma -s $SHELL -lc "curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' -o /tmp/pleroma.zip;unzip /tmp/pleroma.zip -d /tmp/"
|
||||
@ -18,14 +17,14 @@ WORKDIR /tmp
|
||||
|
||||
RUN mkdir -p /etc/akkoma;chown -R akkoma /etc/akkoma
|
||||
|
||||
ADD default.conf /etc/nginx/http.d/
|
||||
ADD start.sh /
|
||||
ADD setup.sh /
|
||||
COPY default.conf /etc/nginx/conf.d/akkoma.conf
|
||||
COPY start.sh /
|
||||
COPY setup.sh /
|
||||
|
||||
ADD crontab /
|
||||
COPY crontab /
|
||||
RUN crontab /crontab
|
||||
|
||||
ADD terms-of-service.html /tmp/
|
||||
ADD favicon.png /tmp/
|
||||
COPY terms-of-service.html /tmp/
|
||||
COPY favicon.png /tmp/
|
||||
|
||||
CMD bash /start.sh
|
||||
|
Binary file not shown.
@ -4,7 +4,7 @@ export SHELL="/bin/bash"
|
||||
cd /opt
|
||||
ls
|
||||
unzip akkoma.zip -d /opt/
|
||||
mv /opt/release/* /opt/akkoma/
|
||||
mv /opt/release /opt/akkoma
|
||||
chown -R akkoma /opt/akkoma
|
||||
mkdir -p /var/lib/akkoma/uploads
|
||||
mkdir -p /var/lib/akkoma/static/static
|
||||
@ -14,12 +14,13 @@ chmod -R 777 /var/lib/akkoma
|
||||
sed -i "s/replaceME/${ENDPOINT}/g" /etc/akkoma/config.exs
|
||||
|
||||
#Nginx and SSL
|
||||
sed -i "s/replaceME/${ENDPOINT}/g" /etc/nginx/http.d/default.conf
|
||||
sed -i "s/replaceME/${ENDPOINT}/g" /etc/nginx/conf.d/akkoma.conf
|
||||
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=CO/L=Denver/O=$ENDPOINT/CN=$ENDPOINT" -keyout /etc/ssl/certs/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
|
||||
mkdir /var/run/nginx
|
||||
|
||||
#Database Setup
|
||||
sleep 10
|
||||
echo "Sleeping for 30 seconds for DB to come up";echo
|
||||
sleep 30
|
||||
export PGPASSWORD="sql"
|
||||
echo "CREATE EXTENSION IF NOT EXISTS citext;"| PGPASSWORD=sql psql -h postgresql -U root pleroma
|
||||
echo "CREATE EXTENSION IF NOT EXISTS pg_trgm;" | PGPASSWORD=sql psql -h postgresql -U root pleroma
|
||||
@ -41,9 +42,10 @@ echo;echo;echo "Sleeping for 30 seconds so Akkoma starts.........."
|
||||
sleep 60
|
||||
echo;echo;echo "Create and Admin User:"
|
||||
cd /opt/akkoma
|
||||
su akkoma -s $SHELL -lc "echo y | ./bin/pleroma_ctl user new verita84 verita84@$ENDPOINT --admin"
|
||||
su akkoma -s $SHELL -lc "echo y | /opt/akkoma/bin/pleroma_ctl user new verita84 verita84@$ENDPOINT --admin"
|
||||
mkdir -p /var/lib/akkoma/static/frontends/tmp
|
||||
chown -R akkoma /var/lib/akkoma/static/frontends/
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl frontend install pleroma-fe --ref stable"
|
||||
su akkoma -s $SHELL -lc "./bin/pleroma_ctl frontend install admin-fe --ref stable"
|
||||
echo 'nameserver 8.8.8.8' > /etc/resolv.conf
|
||||
su akkoma -s $SHELL -lc "/opt/akkoma/bin/pleroma_ctl frontend install pleroma-fe --ref stable"
|
||||
su akkoma -s $SHELL -lc "/opt/akkoma/bin/pleroma_ctl frontend install admin-fe --ref stable"
|
||||
touch /configured.txt
|
||||
|
@ -12,7 +12,7 @@ FILE='/configured.txt'
|
||||
cp -f /usr/share/zoneinfo/US/Mountain /etc/localtime
|
||||
|
||||
#Start Cron and Postgresql
|
||||
crond
|
||||
cron
|
||||
|
||||
#Restore latest Database if container is new
|
||||
if [ ! -f "$FILE" ]
|
||||
|
Loading…
Reference in New Issue
Block a user