-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
42 lines (31 loc) · 1.57 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
FROM abevoelker/ruby
MAINTAINER Abe Voelker <[email protected]>
# Set up application user 'openproject' and check out source
RUN adduser openproject --home /home/openproject --shell /bin/bash --disabled-password --gecos "" &&\
mkdir -p /var/www/openproject &&\
git clone https://github.com/opf/openproject.git -b stable --single-branch /var/www/openproject &&\
mkdir -p /var/www/openproject/docker/scripts
COPY Gemfile.local /var/www/openproject/
RUN chown -R openproject:openproject /var/www/openproject
USER openproject
RUN cd /var/www/openproject &&\
bundle install --without mysql mysql2 sqlite development test rmagick --path vendor/bundle
USER root
COPY database.yml /var/www/openproject/config/
COPY configuration.yml /var/www/openproject/config/
COPY scripts /var/www/openproject/docker/scripts
RUN chown -R openproject:openproject /var/www/openproject &&\
chmod u+x /var/www/openproject/docker/scripts/*.sh
# Add nginx configuration
ADD nginx/nginx.conf /etc/nginx/
ADD nginx/sites-available/openproject.conf /etc/nginx/sites-available/
RUN chown -R openproject:openproject /etc/nginx/sites-available &&\
chown -R openproject:openproject /etc/nginx/sites-enabled &&\
cd /etc/nginx/sites-enabled &&\
rm default &&\
ln -s ../sites-available/openproject.conf
# Add supervisord configs
ADD supervisord/rails.conf /etc/supervisor/conf.d/
ADD supervisord/nginx.conf /etc/supervisor/conf.d/
ADD supervisord/delayed_job.conf /etc/supervisor/conf.d/
CMD ["/var/www/openproject/docker/scripts/start_application.sh"]