-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (32 loc) · 994 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
35
36
37
38
39
40
41
42
43
# Dockerfile
FROM phusion/passenger-ruby22
# MAINTAINER Ross Fairbanks "[email protected]"
# Set correct environment variables.
ENV HOME /root
ENV RAILS_ENV=production \
DB_USER="redmineuser" \
DB_PASS="root!@#1nf0" \
DB_HOST="10.0.0.17" \
DB_BASE="redmine" \
DOMAIN="defmetas.infoway-pi.com.br"
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# Expose Nginx HTTP service
EXPOSE 80
# Start Nginx / Passenger
RUN rm -f /etc/service/nginx/down
# Remove the default site
RUN rm /etc/nginx/sites-enabled/default
# Add the nginx site and config
ADD nginx.conf /etc/nginx/sites-enabled/webapp.conf
ADD rails-env.conf /etc/nginx/main.d/rails-env.conf
# Install bundle of gems
WORKDIR /home/app/webapp
#ADD Gemfile /tmp/
#ADD Gemfile.lock /tmp/
#RUN bundle install
VOLUME /home/app/webapp
# Add the Rails app
RUN chown -R app:app /home/app/webapp
# Clean up APT and bundler when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*