forked from refinery/refinerycms-example-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (37 loc) · 1.01 KB
/
Dockerfile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM mathosk/rpi-ruby-2.6.5-ubuntu-aarch64:latest
MAINTAINER Matho "[email protected]"
RUN apt-get update && apt-get install -y \
curl \
vim \
git \
build-essential \
libgmp-dev \
libpq-dev \
# postgresql-client \
locales \
nginx \
cron \
bash \
imagemagick \
python \
nodejs \
npm
RUN npm install --global yarn
WORKDIR /app
ARG BUNDLE_CODE__MATHO__SK
ARG RAILS_ENV
ADD ./Gemfile ./Gemfile
ADD ./Gemfile.lock ./Gemfile.lock
RUN gem install bundler -v '> 2'
RUN bundle install --deployment --clean --path vendor/bundle --without development test --jobs 8
ADD . .
# Set Nginx config
ADD config/etc/nginx/conf.d/nginx.docker.conf /etc/nginx/conf.d/default.conf
RUN rm /etc/nginx/sites-enabled/default
ADD .env.example .env.production
RUN ASSET_PRECOMPILE_MODE=1 bundle exec rake assets:precompile RAILS_ENV=production --trace
RUN echo $(date) > BUILD_DATE.txt
ARG GITHUB_SHA
RUN echo $GITHUB_SHA > DEPLOYED_REVISION.txt
EXPOSE 80
CMD bin/run.docker.sh