Compare commits

..

No commits in common. "2022update" and "master" have entirely different histories.

3 changed files with 18 additions and 26 deletions

View File

@ -1,4 +1,4 @@
FROM phusion/baseimage:jammy-1.0.1 FROM phusion/baseimage:0.11
# Use baseimage-docker's init system. # Use baseimage-docker's init system.
CMD ["/sbin/my_init"] CMD ["/sbin/my_init"]
@ -14,7 +14,6 @@ ENV \
RAILS_SERVE_STATIC_FILES=true \ RAILS_SERVE_STATIC_FILES=true \
RAILS_ENV=production \ RAILS_ENV=production \
NODE_ENV=production \ NODE_ENV=production \
DEBIAN_FRONTEND=noninteractive \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mastodon/app/bin PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mastodon/app/bin
ARG UID=991 ARG UID=991
@ -23,13 +22,7 @@ ARG GID=991
# this repo master maps to upstream master, branches in this repo # this repo master maps to upstream master, branches in this repo
# map to specific upstream commits that are released as versions # map to specific upstream commits that are released as versions
ARG REPO_URL=https://github.com/tootsuite/mastodon.git ARG REPO_URL=https://github.com/tootsuite/mastodon.git
# main branch as of 2022-11-26 ARG REPO_REV=master
ARG REPO_REV=95b24c51ece406ee50a67c9682fd5bd887d927e5
# specified in repo
ARG RUBY_VERSION=3.0.4
RUN apt update && apt install -y curl jq
# install os prereq stuff to image # install os prereq stuff to image
ADD prereqs.sh /tmp/prereqs.sh ADD prereqs.sh /tmp/prereqs.sh
@ -59,3 +52,6 @@ RUN chmod +x /etc/service/streaming/run
VOLUME /state VOLUME /state
EXPOSE 3000 4000 EXPOSE 3000 4000
LABEL maintainer="Jeffrey Paul <sneak@sneak.berlin>" \
description="Your self-hosted, globally interconnected microblogging community"

View File

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
set -x
export PATH="$HOME/.rbenv/bin:$PATH" export PATH="$HOME/.rbenv/bin:$PATH"
export RUBY_CONFIGURE_OPTS="--with-jemalloc" export RUBY_CONFIGURE_OPTS="--with-jemalloc"
@ -11,8 +9,8 @@ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $HOME/.bashrc
echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
eval "$(rbenv init -)" eval "$(rbenv init -)"
rbenv install $RUBY_VERSION rbenv install 2.6.5
rbenv global $RUBY_VERSION rbenv global 2.6.5
gem update --system gem update --system
gem install bundler --no-document gem install bundler --no-document

View File

@ -5,25 +5,23 @@ set -x
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
MRUM="main restricted universe multiverse" MRUM="main restricted universe multiverse"
COUNTRY="$(curl ipinfo.io | jq -r .country)" M="mirror://mirrors.ubuntu.com/mirrors.txt"
#M="mirror://mirrors.ubuntu.com/mirrors.txt"
M="http://$COUNTRY.archive.ubuntu.com/ubuntu"
R="$(lsb_release -cs)"
cat > /etc/apt/sources.list <<EOF cat > /etc/apt/sources.list <<EOF
deb $M $R $MRUM deb $M bionic $MRUM
deb $M $R-updates $MRUM deb $M bionic-updates $MRUM
deb $M $R-security $MRUM deb $M bionic-security $MRUM
deb $M $R-backports $MRUM deb $M bionic-backports $MRUM
EOF EOF
# these instructions are cribbed from # these instructions are cribbed from
# https://docs.joinmastodon.org/administration/installation/ # https://docs.joinmastodon.org/administration/installation/
# this is fine, totally secure, nothing to see here # this is fine, totally secure, nothing to see here
curl -sL https://deb.nodesource.com/setup_16.x | bash - curl -sL https://deb.nodesource.com/setup_8.x | bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null # same here
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt update apt update
@ -36,11 +34,11 @@ apt install -y \
file \ file \
g++ \ g++ \
gcc \ gcc \
git \ git-core \
imagemagick \ imagemagick \
libffi-dev \ libffi-dev \
libgdbm-dev \ libgdbm-dev \
libgdbm6 \ libgdbm5 \
libicu-dev \ libicu-dev \
libidn11-dev \ libidn11-dev \
libjemalloc-dev \ libjemalloc-dev \