Skip to content

Commit

Permalink
Created makefile for deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
n.lyubchich committed Aug 18, 2015
1 parent 5bea961 commit ae145bd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile
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

0 comments on commit ae145bd

Please sign in to comment.