It builds. Needs testing

This commit is contained in:
Tanshu
2016-01-31 14:03:28 +05:30
parent dfff92d978
commit d70e9ae860
6 changed files with 44 additions and 11 deletions
+5 -9
View File
@@ -2,9 +2,9 @@ web:
restart: always restart: always
build: ./web build: ./web
expose: expose:
- "6543" - "80"
ports: ports:
- "6543:6543" - "6543:80"
links: links:
- postgres:postgres - postgres:postgres
volumes: volumes:
@@ -17,19 +17,15 @@ web:
nginx: nginx:
restart: always restart: always
build: ./nginx/ build: ./nginx
ports: ports:
- "80:80" - "8005:80"
volumes:
- /www/static
volumes_from:
- web
links: links:
- web:web - web:web
postgres: postgres:
restart: always restart: always
image: ./postgres build: ./postgres
volumes: volumes:
- pgdata:/var/lib/postgresql/data - pgdata:/var/lib/postgresql/data
expose: expose:
+4
View File
@@ -0,0 +1,4 @@
FROM nginx:latest
MAINTAINER tanshu
COPY brew.conf /etc/nginx/conf.d/default.conf
+13
View File
@@ -0,0 +1,13 @@
server {
listen 80;
server_name example.org;
charset utf-8;
location / {
proxy_pass http://web:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Executable
+3
View File
@@ -0,0 +1,3 @@
docker volume create --name pgdata
docker-compose build
docker-compose up -d
+4 -2
View File
@@ -4,9 +4,11 @@ MAINTAINER tanshu
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
RUN git clone http://git.tanshu.com/tanshu/brewman.git \ RUN git clone --depth=1 http://git.tanshu.com/tanshu/brewman.git \
&& pip install -r brewman/requirements.txt && pip install -r brewman/requirements.txt
WORKDIR /brewman WORKDIR /brewman
CMD /usr/local/bin/pserver /brewman/container.ini RUN python setup.py install
CMD /usr/local/bin/pserve /brewman/container.ini
+15
View File
@@ -0,0 +1,15 @@
FROM python:3
MAINTAINER tanshu
ENV PYTHONUNBUFFERED 1
COPY src /brewman
WORKDIR /brewman
RUN pip install -r requirements.txt
RUN python setup.py install
CMD /usr/local/bin/pserve /brewman/container.ini