forked from hpyhacking/peatio
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
43 lines (30 loc) · 1.21 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
43
FROM phusion/passenger-full
MAINTAINER PEATIO community@peatio.com
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]
RUN apt update
RUN apt-get -y install imagemagick gsfonts
ADD peatio /home/app/peatio
RUN chown -R app:app /home/app/peatio
USER app
ENV HOME /home/app
WORKDIR /home/app/peatio
RUN bundle install --without development test --path vendor/bundle
# RUN ./bin/init_config
ADD conf/rails-amqp.yml /home/app/peatio/config/amqp.yml
ADD conf/rails-database.yml /home/app/peatio/config/database.yml
ADD conf/rails-application.yml /home/app/peatio/config/application.yml
ADD conf/nginx-peatio-env.conf /etc/nginx/main.d/peatio-env.conf
USER root
RUN rm /etc/nginx/sites-enabled/default
ADD conf/nginx-peatio-with-ssl.conf /etc/nginx/sites-available/peatio
RUN ln -s /etc/nginx/sites-available/peatio /etc/nginx/sites-enabled/peatio
RUN mkdir /etc/nginx/ssl_keys/
ADD conf/ssl_keys/server.crt /etc/nginx/ssl_keys/server.crt
ADD conf/ssl_keys/server.key /etc/nginx/ssl_keys/server.key
RUN chown -R app:app /home/app/peatio/config
RUN rm -f /etc/service/nginx/down
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*