Skip to content

Commit

Permalink
wip(docker): trying to get docker to work
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Rikken committed Nov 12, 2016
1 parent 9658ec8 commit 7576a0a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ docker-clean: ## Remove the docker environment

docker-init: ## Initialize the docker environment
@docker-compose up --no-recreate -d db
@sleep 5
@sleep 10
@docker-compose up --no-recreate -d web
@PGPASSWORD=$(PGPASSWORD) psql -h localhost -U postgres freedomvote < tools/docker/cache_table.sql
@PGPASSWORD=$(PGPASSWORD) psql -h localhost -p 5433 -U postgres freedomvote < tools/docker/cache_table.sql
@make docker-migrate
@docker exec -it freedomvote_web_1 app/manage.py loaddata tools/docker/user.json
@docker-compose stop
Expand Down
2 changes: 1 addition & 1 deletion app/freedomvote/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

DEFAULT_SETTINGS = {
'DB' : {
'HOST' : 'db',
'HOST' : 'localhost',
'NAME' : 'freedomvote',
'USER' : 'postgres',
'PASS' : 'freedomvote',
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
db:
image: postgres
ports:
- "5432:5432"
- "5433:5432"
environment:
- POSTGRES_DB=freedomvote
- POSTGRES_PASSWORD=freedomvote
Expand All @@ -15,3 +15,4 @@ web:
- "8000:8000"
links:
- db
tty: false

0 comments on commit 7576a0a

Please sign in to comment.