-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
n.lyubchich
committed
Aug 18, 2015
1 parent
5bea961
commit ae145bd
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
all: staticdata db app nginx | ||
|
||
db: | ||
docker run --name postgres -e POSTGRES_PASSWORD=qwerty -e POSTGRES_USER=root -d postgres | ||
sleep 10 | ||
docker exec postgres psql -c "CREATE DATABASE hrportal" | ||
|
||
app: | ||
docker build -t hruaprom docker/hrportal | ||
docker run --name hrportal --volumes-from staticdata --link postgres:postgres -d hruaprom | ||
docker exec hrportal python3 manage.py dbutils init -p | ||
|
||
staticdata: | ||
docker create -v /staticdata --name staticdata ubuntu /bin/true | ||
|
||
nginx: | ||
docker build -t nginx docker/nginx/ | ||
docker run --name nginx --link hrportal:hrportal --volumes-from staticdata -p 80:80 -d nginx |