-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (32 loc) · 1.28 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
44
FROM phusion/passenger-customizable:0.9.15
MAINTAINER 100 Shapes <[email protected]>
# Set correct environment variables.
# ENV HOME /app
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]
# Build system and git.
RUN /pd_build/utilities.sh
RUN /pd_build/python.sh
RUN /pd_build/nodejs.sh
RUN apt-get update && apt-get install -y -o Dpkg::Options::="--force-confold" passenger nginx-extras
RUN curl -sLo /usr/local/bin/ep https://github.com/kreuzwerker/envplate/releases/download/v0.0.7/ep-linux && chmod +x /usr/local/bin/ep
RUN npm install -g npm
ENV GIT_URL https://github.com/100Shapes/100Shapes.com-content-API.git
ENV BRANCH production
ENV VIRTUAL_HOST api.100shapes.com
ENV FRONTEND_URL http://www.100shapes.com
RUN mkdir -p /etc/my_init.d
ADD clone-content.sh /pd_build/clone-content.sh
RUN ep /pd_build/clone-content.sh
RUN /pd_build/clone-content.sh
ADD pull-content.sh /etc/my_init.d/pull-content.sh
RUN ep /etc/my_init.d/pull-content.sh
RUN chmod u+x /etc/my_init.d/pull-content.sh
# Enable nginx
RUN rm -f /etc/service/nginx/down
RUN rm /etc/nginx/sites-enabled/default
ADD nginx.conf /etc/nginx/sites-enabled/nginx.conf
ADD env.conf /etc/nginx/main.d/node-env.conf
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 80