File: Dockerfile

package info (click to toggle)
tdiary 5.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,852 kB
  • sloc: ruby: 22,925; xml: 325; makefile: 16; sh: 10
file content (24 lines) | stat: -rw-r--r-- 722 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM ruby:2.5
MAINTAINER MATSUOKA Kohei @machu

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY [ "Gemfile", "Gemfile.lock", "/usr/src/app/" ]
RUN apt update && apt install libidn11-dev; \
    echo 'gem "puma" \n\
    gem "tdiary-contrib" \n\
    gem "tdiary-style-gfm" \n\
    gem "tdiary-style-rd" \n'\
    > Gemfile.local; \
    bundle --path=vendor/bundle --without=development:test --jobs=4 --retry=3

COPY . /usr/src/app/
RUN if [ ! -e tdiary.conf ]; then cp tdiary.conf.beginner tdiary.conf; fi && \
    bundle && \
    bundle exec rake assets:copy

VOLUME [ "/usr/src/app/data", "/usr/src/app/public" ]
EXPOSE 9292
ENV HTPASSWD=data/.htpasswd
CMD [ "bundle", "exec", "rackup", "-o", "0.0.0.0", "-p", "9292" ]