forked from klen/py-frameworks-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (20 loc) · 914 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
FROM phusion/baseimage
MAINTAINER Kirill Klenov <[email protected]>
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
RUN apt-get update && \
apt-get install sudo nginx-full -y && \
apt-get install postgresql postgresql-contrib -y
# Setup nginx service
RUN mkdir /etc/service/nginx
ADD deploy/nginx.sh /etc/service/nginx/run
RUN chmod +x /etc/service/nginx/run
RUN echo "server {listen 80; location / { echo 'Hello, World!'; echo_sleep .1; } }" > /etc/nginx/sites-available/default
# Setup postgres service
RUN mkdir /etc/service/postgres
ADD deploy/postgres.sh /etc/service/postgres/run
RUN chmod +x /etc/service/postgres/run && \
echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.5/main/pg_hba.conf && \
echo "listen_addresses='*'" >> /etc/postgresql/9.5/main/postgresql.conf
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*