Skip to content

Commit

Permalink
Merge branch 'master' into wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
CSammy committed Apr 14, 2018
2 parents 932c869 + b89ecda commit 9cbd52f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.env
diaspora.docker
46 changes: 11 additions & 35 deletions Dockerfile.diaspora
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM debian:stretch as base
FROM ruby:2.4.4-slim-stretch

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y -qq \
build-essential \
libssl-dev \
libcurl4-openssl-dev \
libidn11-dev \
libxml2-dev \
libxslt-dev \
imagemagick \
Expand All @@ -16,20 +17,6 @@ RUN apt-get update \
libpq-dev \
cmake \
nodejs \
# Packages for RVM
gawk \
libyaml-dev \
libsqlite3-dev \
sqlite3 \
autoconf \
libgmp-dev \
libgdbm-dev \
libncurses5-dev \
automake \
bison \
libffi-dev \
libgmp-dev \
libreadline-dev \
&& rm -rf /var/lib/apt/lists/*

ARG EXT_UID
Expand All @@ -38,26 +25,15 @@ RUN addgroup --system --gid ${EXT_GID} diaspora
RUN adduser --system --uid ${EXT_UID} --gid ${EXT_GID} diaspora

USER diaspora
RUN mkdir /home/diaspora/diaspora
WORKDIR /home/diaspora/diaspora

# Install RVM + Ruby
ENV LANG=C.UTF8

RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import - \
&& curl -L https://s.diaspora.software/1t | bash \
&& rm -rf ~/.gnupg
SHELL ["/bin/bash", "--login", "-c"]

RUN rvm install 2.4

# Install bundler
RUN echo diaspora > .ruby-gemset \
&& echo 2.4 > .ruby-version \
&& touch Gemfile \
&& cd ../diaspora \
&& gem install bundler \
&& rm .ruby-* Gemfile
ENV DIASPORA_HOME /home/diaspora/diaspora
RUN mkdir $DIASPORA_HOME
WORKDIR $DIASPORA_HOME

ENV GEM_HOME $DIASPORA_HOME/vendor/bundle
ENV BUNDLE_PATH="$GEM_HOME" \
BUNDLE_BIN="$GEM_HOME/bin" \
BUNDLE_APP_CONFIG="$DIASPORA_HOME/.bundle"
ENV PATH $BUNDLE_BIN:$PATH

# Finish setup
COPY ./start.sh ../start.sh
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ This image is intended exclusively for development.

- Control migrations and bundle installing more intuitively
- Create external script for controlling/handling the setup
- RVM env with proper commands (`rvm gemset create 2.4@diaspora && rvm ruby-2.4@diaspora do gem install bundler`) instead of building a "skeleton" by hand (see also https://github.com/SuperTux88/diaspora-formula/blob/master/diaspora/install.sls)
1 change: 0 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

action_install_gems() {
script/configure_bundler
bin/bundle config --local path vendor/bundle
bin/bundle install --full-index
}

Expand Down

0 comments on commit 9cbd52f

Please sign in to comment.