-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (23 loc) · 787 Bytes
/
Dockerfile
File metadata and controls
27 lines (23 loc) · 787 Bytes
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
FROM ruby:3.1
LABEL maintainer "@tdtds <t@tdtds.jp>"
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY [ "Gemfile", "Gemfile.lock", "/usr/src/app/" ]
RUN apt update && apt install -y apt-utils libidn11-dev; \
echo 'gem "puma" \n\
gem "tdiary-contrib" \n\
gem "tdiary-style-gfm" \n\
gem "tdiary-style-rd" \n'\
> Gemfile.local; \
gem install bundler && \
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 PORT=9292
ENV HTPASSWD=data/.htpasswd
ENV RACK_ENV=deployment
CMD bundle exec rackup -o 0.0.0.0 -p ${PORT}