Fixtures for brew in postgres
This commit is contained in:
parent
92c8601118
commit
dfff92d978
@ -2,14 +2,16 @@ web:
|
|||||||
restart: always
|
restart: always
|
||||||
build: ./web
|
build: ./web
|
||||||
expose:
|
expose:
|
||||||
- "8000"
|
- "6543"
|
||||||
|
ports:
|
||||||
|
- "6543:6543"
|
||||||
links:
|
links:
|
||||||
- postgres:postgres
|
- postgres:postgres
|
||||||
volumes:
|
volumes:
|
||||||
- /usr/src/app/static
|
- /usr/src/app/static
|
||||||
environment:
|
environment:
|
||||||
DB_NAME: brew
|
DB_NAME: brew
|
||||||
DB_USER: postgres
|
DB_USER: brew
|
||||||
DB_PASS: 123456
|
DB_PASS: 123456
|
||||||
SECRET_KEY: secret
|
SECRET_KEY: secret
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ nginx:
|
|||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
restart: always
|
restart: always
|
||||||
image: postgres:latest
|
image: ./postgres
|
||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
expose:
|
expose:
|
||||||
|
5
postgres/Dockerfile
Normal file
5
postgres/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM postgres:latest
|
||||||
|
MAINTAINER tanshu
|
||||||
|
|
||||||
|
COPY user.sql /docker-entrypoint-initdb.d/
|
||||||
|
COPY brew.sql /docker-entrypoint-initdb.d/
|
2
postgres/brew.sql
Normal file
2
postgres/brew.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
CREATE DATABASE brew;
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE brew TO brew;
|
1
postgres/user.sql
Normal file
1
postgres/user.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
CREATE USER brew WITH PASSWORD '123456';
|
Loading…
Reference in New Issue
Block a user