builds now
This commit is contained in:
parent
daeadee5fd
commit
a8f0acfc3e
14
Dockerfile
14
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM phusion/baseimage:0.11
|
||||
FROM phusion/baseimage:jammy-1.0.1
|
||||
|
||||
# Use baseimage-docker's init system.
|
||||
CMD ["/sbin/my_init"]
|
||||
@ -14,6 +14,7 @@ ENV \
|
||||
RAILS_SERVE_STATIC_FILES=true \
|
||||
RAILS_ENV=production \
|
||||
NODE_ENV=production \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mastodon/app/bin
|
||||
|
||||
ARG UID=991
|
||||
@ -22,7 +23,13 @@ ARG GID=991
|
||||
# this repo master maps to upstream master, branches in this repo
|
||||
# map to specific upstream commits that are released as versions
|
||||
ARG REPO_URL=https://github.com/tootsuite/mastodon.git
|
||||
ARG REPO_REV=master
|
||||
# main branch as of 2022-11-26
|
||||
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
|
||||
ADD prereqs.sh /tmp/prereqs.sh
|
||||
@ -52,6 +59,3 @@ RUN chmod +x /etc/service/streaming/run
|
||||
VOLUME /state
|
||||
|
||||
EXPOSE 3000 4000
|
||||
|
||||
LABEL maintainer="Jeffrey Paul <sneak@sneak.berlin>" \
|
||||
description="Your self-hosted, globally interconnected microblogging community"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
export PATH="$HOME/.rbenv/bin:$PATH"
|
||||
export RUBY_CONFIGURE_OPTS="--with-jemalloc"
|
||||
|
||||
@ -9,8 +11,8 @@ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $HOME/.bashrc
|
||||
echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc
|
||||
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
|
||||
eval "$(rbenv init -)"
|
||||
rbenv install 2.6.5
|
||||
rbenv global 2.6.5
|
||||
rbenv install $RUBY_VERSION
|
||||
rbenv global $RUBY_VERSION
|
||||
gem update --system
|
||||
gem install bundler --no-document
|
||||
|
||||
|
24
prereqs.sh
24
prereqs.sh
@ -5,23 +5,25 @@ set -x
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
MRUM="main restricted universe multiverse"
|
||||
M="mirror://mirrors.ubuntu.com/mirrors.txt"
|
||||
COUNTRY="$(curl ipinfo.io | jq -r .country)"
|
||||
#M="mirror://mirrors.ubuntu.com/mirrors.txt"
|
||||
M="http://$COUNTRY.archive.ubuntu.com/ubuntu"
|
||||
R="$(lsb_release -cs)"
|
||||
cat > /etc/apt/sources.list <<EOF
|
||||
deb $M bionic $MRUM
|
||||
deb $M bionic-updates $MRUM
|
||||
deb $M bionic-security $MRUM
|
||||
deb $M bionic-backports $MRUM
|
||||
deb $M $R $MRUM
|
||||
deb $M $R-updates $MRUM
|
||||
deb $M $R-security $MRUM
|
||||
deb $M $R-backports $MRUM
|
||||
EOF
|
||||
|
||||
# these instructions are cribbed from
|
||||
# https://docs.joinmastodon.org/administration/installation/
|
||||
|
||||
# this is fine, totally secure, nothing to see here
|
||||
curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
||||
curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
||||
|
||||
# same here
|
||||
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
|
||||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null
|
||||
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||
|
||||
apt update
|
||||
|
||||
@ -34,11 +36,11 @@ apt install -y \
|
||||
file \
|
||||
g++ \
|
||||
gcc \
|
||||
git-core \
|
||||
git \
|
||||
imagemagick \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libgdbm5 \
|
||||
libgdbm6 \
|
||||
libicu-dev \
|
||||
libidn11-dev \
|
||||
libjemalloc-dev \
|
||||
|
Loading…
Reference in New Issue
Block a user