summaryrefslogtreecommitdiff
blob: b9fdff9c81800579ca74f9df673db419e4c8a48d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM ruby:2-alpine

ARG USER_ID
ARG GROUP_ID

RUN apk add --update nodejs npm build-base sqlite sqlite-dev sqlite-libs git

RUN addgroup --gid $GROUP_ID gplanet
RUN adduser --system --disabled-password --gecos '' --uid $USER_ID --ingroup gplanet gplanet

COPY --chown=gplanet:gplanet  . /var/www/planet.gentoo.org
WORKDIR /var/www/planet.gentoo.org

USER gplanet

RUN bundle install \
    && npm install \
    && cd node_modules/@gentoo/tyrian \
    && npm install \
    && npm run dist

# planet has to be last
RUN echo "title = Planet Gentoo\n" > planet.ini \
    && cat configs/universe configs/planet >> planet.ini

CMD cd /var/www/planet.gentoo.org \
    && bundle exec pluto update -d data \
    && bundle exec pluto build -o build -d data -t tyrian