-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (30 loc) · 1008 Bytes
/
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
FROM phusion/passenger-ruby23:0.9.27
RUN apt-get update -qq && apt-get install -y sphinxsearch tzdata ssmtp
RUN mkdir /bcmets && chown app /bcmets
WORKDIR /bcmets
USER app
COPY Gemfile Gemfile
COPY --chown=app Gemfile.lock Gemfile.lock
RUN bundle --deployment
USER root
COPY docker/ssmtp.conf /etc/ssmtp/ssmtp.conf
RUN rm -f /etc/nginx/sites-enabled/default
COPY docker/80-enable-web.sh /etc/my_init.d
COPY docker/80-enable-cron.sh /etc/my_init.d
COPY docker/85-enable-sphinx.sh /etc/my_init.d
COPY docker/crontab /bcmets/crontab
COPY docker/nginx-bcmets.conf /etc/nginx/sites-enabled/bcmets.conf
COPY docker/nginx-env.conf /etc/nginx/main.d/env.conf
COPY config.ru config.ru
COPY Rakefile Rakefile
COPY script script
COPY config config
COPY vendor/assets vendor/assets
COPY db db
COPY app app
COPY lib lib
COPY public public
COPY docker/assets-database.yml config/database.yml
RUN bundle exec rake assets:precompile RAILS_ENV=production
COPY config/database.yml config/database.yml
RUN chown -R app tmp