forked from oldfartdeveloper/docker-cms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.general
29 lines (22 loc) · 980 Bytes
/
Dockerfile.general
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
# DOCKER_VERSION 0.9.0
# VERSION 0.1.0
FROM ubuntu:12.04
MAINTAINER Edward Paget <[email protected]>
# Setup Apt
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install apt-transport-https ca-certificates
RUN echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main" >> /etc/apt/sources.list
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install nginx-extras passenger supervisor
# Configure nginx
RUN mkdir -p /var/log/supervisor
RUN rm /etc/nginx/sites-enabled/default
ADD config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ADD config/nginx.conf /etc/nginx/nginx.conf
ADD start_nginx_rails.sh /opt/start_nginx_rails.sh
ADD config/site.conf /etc/nginx/sites-enabled/site.conf
RUN chmod +x ./opt/start_nginx_rails.sh
VOLUME ["/var/log/nginx", "/var/log/supervisor"]
EXPOSE 80
ENTRYPOINT ["./opt/start_nginx_rails.sh"]