should buildshould build
This commit is contained in:
parent
21ee1776b5
commit
bf6a0dc199
10
Dockerfile
10
Dockerfile
@ -3,10 +3,14 @@ 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"]
|
||||||
|
|
||||||
ADD setup.sh /tmp/setup.sh
|
# install os prereq stuff to image
|
||||||
|
ADD prereqs.sh /tmp/prereqs.sh
|
||||||
|
RUN bash /tmp/prereqs.sh
|
||||||
|
|
||||||
# install stuff to image
|
# install mastodon:
|
||||||
RUN bash /tmp/setup.sh
|
ADD install.sh /tmp/install.sh
|
||||||
|
|
||||||
|
RUN chpst -u mastodon:mastodon bash /tmp/install.sh
|
||||||
|
|
||||||
ADD ./rootfs /
|
ADD ./rootfs /
|
||||||
|
|
||||||
|
26
install.sh
Normal file
26
install.sh
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export HOME="/mastodon"
|
||||||
|
export PATH="$HOME/.rbenv/bin:$PATH"
|
||||||
|
export RUBY_CONFIGURE_OPTS="--with-jemalloc"
|
||||||
|
|
||||||
|
git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv
|
||||||
|
cd $HOME/.rbenv && src/configure && make -C src
|
||||||
|
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.1
|
||||||
|
rbenv global 2.6.1
|
||||||
|
gem update --system
|
||||||
|
gem install bundler --no-document
|
||||||
|
|
||||||
|
git clone https://github.com/tootsuite/mastodon.git /mastodon/app
|
||||||
|
cd /mastodon/app
|
||||||
|
# v3.0.1:
|
||||||
|
git checkout c4118ba71ba31e408c02d289e111326ccc6f6aa2
|
||||||
|
|
||||||
|
bundle install \
|
||||||
|
-j$(getconf _NPROCESSORS_ONLN) \
|
||||||
|
--deployment --without development test
|
||||||
|
yarn install --pure-lockfile
|
@ -61,20 +61,5 @@ apt install -y \
|
|||||||
yarn \
|
yarn \
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
|
|
||||||
addgroup -g 991 mastodon
|
addgroup --gid 991 mastodon
|
||||||
useradd --uid 991 --gid 991 -m -d /mastodon mastodon
|
useradd --uid 991 --gid 991 -m -d /mastodon mastodon
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
su - mastodon <<'EOF'
|
|
||||||
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
|
||||||
cd ~/.rbenv && src/configure && make -C src
|
|
||||||
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
|
|
||||||
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
|
|
||||||
source ~/.bashrc
|
|
||||||
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
|
|
||||||
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 2.6.1
|
|
||||||
rbenv global 2.6.1
|
|
||||||
gem update --system
|
|
||||||
gem install bundler --no-document
|
|
||||||
EOF
|
|
0
rootfs/etc/service/postgres/run
Normal file
0
rootfs/etc/service/postgres/run
Normal file
0
rootfs/etc/service/redis/run
Normal file
0
rootfs/etc/service/redis/run
Normal file
0
rootfs/etc/service/sidekiq/run
Normal file
0
rootfs/etc/service/sidekiq/run
Normal file
0
rootfs/etc/service/streaming/run
Normal file
0
rootfs/etc/service/streaming/run
Normal file
0
rootfs/etc/service/web/run
Normal file
0
rootfs/etc/service/web/run
Normal file
Loading…
Reference in New Issue
Block a user