Initial Commit

This commit is contained in:
Tanshu 2016-01-30 09:55:16 +05:30
commit 8b12c5d153
3 changed files with 50 additions and 0 deletions

40
docker-compose.yml Normal file
View File

@ -0,0 +1,40 @@
web:
restart: always
build: ./web
expose:
- "8000"
links:
- postgres:postgres
volumes:
- /usr/src/app/static
environment:
DB_NAME: brew
DB_USER: postgres
DB_PASS: 123456
SECRET_KEY: secret
command: /usr/local/bin/gunicorn -w 2 -b :8000 app:app
nginx:
restart: always
build: ./nginx/
ports:
- "80:80"
volumes:
- /www/static
volumes_from:
- web
links:
- web:web
postgres:
restart: always
image: postgres:latest
volumes:
- pgdata:/var/lib/postgresql/data
expose:
- "5432"
environment:
POSTGRES_PASSWORD: 123456
POSTGRES_USER: postgres

2
postgres.sh Normal file
View File

@ -0,0 +1,2 @@
docker volume create --name pgdata
docker run --name some-postgres -v pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -d postgres

8
web/Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM python:3
MAINTAINER tanshu
ENV PYTHONUNBUFFERED 1
RUN git clone http://git.tanshu.com/tanshu/brewman.git \
&& pip install -r brewman/requirements.txt