Blog platform
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
840 B

  1. FROM phusion/passenger-ruby26
  2. #Yarn
  3. RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
  4. RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
  5. RUN apt-get update -qq && \
  6. apt-get install -y build-essential libpq-dev sudo tzdata yarn imagemagick
  7. RUN bash -lc 'rvm install ruby-2.6.4'
  8. RUN bash -lc 'rvm --default use ruby-2.6.4'
  9. RUN gem install bundler
  10. RUN sudo -u app mkdir /home/app/pressr
  11. COPY Gemfile Gemfile.lock /home/app/pressr/
  12. WORKDIR /home/app/pressr
  13. ENV RAILS_ENV production
  14. RUN sudo -u app bundle install --deployment
  15. COPY --chown=app:app . /home/app/pressr/
  16. ADD dockerstart.sh /dockerstart.sh
  17. RUN rm -f /etc/service/nginx/down
  18. RUN rm /etc/nginx/sites-enabled/default
  19. ADD webapp.conf /etc/nginx/sites-enabled/webapp.conf
  20. CMD ["/dockerstart.sh"]
  21. EXPOSE 3000