Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM phusion/passenger-customizable
- MAINTAINER VodkaMD <support@nyvur.com>
- ENV RACK_ENV="production" RAILS_ENV="production" SECRET_KEY_BASE="e09afa8b753cb175bcef7eb5f737accd02a4c16d9b6e5d475943605abd4277cdf47c488812d21d9c7117efd489d876f34be52f7ef7e88b21759a079339b198ce"
- ENV HOME /root
- CMD ["/sbin/my_init"]
- RUN /pd_build/utilities.sh
- RUN /pd_build/ruby2.2.sh
- RUN /pd_build/python.sh
- RUN /pd_build/nodejs.sh
- # Custom instructions
- RUN apt-get update && apt-get install -y vim nano dialog net-tools build-essential wget
- RUN apt-get install -y postgresql-client --no-install-recommends
- RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
- # Generate SSL Certificate
- RUN mkdir /etc/nginx/ssl
- # RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt
- # Enable Nginx and Passenger
- RUN rm -f /etc/service/nginx/down
- # Enable Redis
- RUN rm -f /etc/service/redis/down
- # Enable SSH
- RUN rm -f /etc/service/sshd/down
- # Enable Postgres
- RUN rm -f /etc/service/postgres/down
- # Install bundle of gems
- WORKDIR /tmp
- ADD Gemfile /tmp/
- ADD Gemfile.lock /tmp/
- RUN bundle install
- # Copy application folder
- RUN mkdir /home/app/Nyvur
- ADD . /home/app/Nyvur
- RUN chown -R app:app /home/app/Nyvur
- WORKDIR /home/app/Nyvur
- RUN bundle exec rake assets:precompile
- # Add a virtual host entry
- RUN rm /etc/nginx/sites-enabled/default
- COPY config/nginx_configs.conf /etc/nginx/sites-enabled/Nyvur.conf
- ADD config/postgres-env.conf /etc/nginx/main.d/postgres-env.conf
- RUN mkdir -p /var/www/Nyvur/tmp/pids
- RUN mkdir -p /var/www/Nyvur/tmp/sockets
- RUN mkdir -p /var/www/Nyvur/log
- RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
- EXPOSE 80 443
- RUN bundle exec passenger start -p 80 -e production
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement