Skip to content

Commit

Permalink
name docker containers as workaround for issue #21
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Dec 11, 2013
1 parent bed03fe commit cab03e1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion bin/discourse-start
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ START_DISCOURSE="sudo docker run \
if [ "$1" = "web" ]; then
# TODO: use random port on host, and change nginx-start
# accordingly.
START_DISCOURSE="$START_DISCOURSE -p 3000:3000"
START_DISCOURSE="$START_DISCOURSE -p 3000:3000 -name discourse-docker-web"
fi

if [ "$1" = "sidekiq" ]; then
START_DISCOURSE="$START_DISCOURSE -name discourse-docker-sidekiq"
fi

set -x
Expand Down
2 changes: 1 addition & 1 deletion bin/nginx-start
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
set -x
# Assign static port (NGINX_PORT) for nginx front so that it can be
# reliably used in the frontend's config file.
exec sudo docker run \
exec sudo docker run -name=discourse-docker-nginx \
-e SITE_PORT=$DISCOURSE_PORT \
-e SITE_HOST=$HOSTIP \
-e SITE_NAME=discourse.example.com \
Expand Down
3 changes: 2 additions & 1 deletion bin/postgresql-start
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
. etc/env

set -x
exec sudo docker run -p 5432 \
exec sudo docker run -name=discourse-docker-postgresql \
-p 5432 \
-v $(pwd)/data/postgres:/var/lib/postgresql \
srid/postgresql:9.1
2 changes: 1 addition & 1 deletion bin/redis-start
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e
. etc/env

set -x
exec sudo docker run -p 6379 srid/redis:2.6
exec sudo docker run -name=discourse-docker-redis -p 6379 srid/redis:2.6

0 comments on commit cab03e1

Please sign in to comment.