-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 832 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 832 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
28
29
30
31
32
33
34
35
36
FROM ruby:2.6.3-alpine
ENV PORT=3000
ENV RAILS_ENV=production
ENV RACK_ENV=production
ENV RAILS_ROOT /opt/app
WORKDIR /opt/app
RUN echo 'set -e' > /boot.sh # this is the script which will run on boot
RUN apk add --no-cache build-base \
tzdata \
git \
nodejs \
mysql-client \
mariadb-dev
# if you need a build script, uncomment the line below
# RUN echo 'sh mybuild.sh' >> /boot.sh
# daemon for cron jobs
# RUN echo 'echo will install crond...' >> /boot.sh
# RUN echo 'crond' >> /boot.sh
RUN echo 'echo bundle install' >> /boot.sh
RUN echo 'bundle install --jobs 20 --retry 5 --without development test' >> /boot.sh
# RACK_ENV=development RAILS_ENV=development bin/delayed_job -n 5 start
# todo: migration?
# launch the application
RUN echo 'echo starting the application' >> /boot.sh
CMD sh /boot.sh && rails s