Initial Commit
This commit is contained in:
commit
8b12c5d153
40
docker-compose.yml
Normal file
40
docker-compose.yml
Normal 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
2
postgres.sh
Normal 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
8
web/Dockerfile
Normal 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
|
Loading…
Reference in New Issue
Block a user