Skip to content
Permalink
Browse files

add wrappers for mailcatcher and sidekiq

add symlink to simplify invoking docker commands `d/rake`
  • Loading branch information...
SamSaffron committed Dec 12, 2016
1 parent 600541c commit 97e2a614c8587bbd9535ed28dc1bcf766751b2cc
Showing with 11 additions and 1 deletion.
  1. +1 −1 bin/docker/boot_dev
  2. +4 −0 bin/docker/mailcatcher
  3. +5 −0 bin/docker/sidekiq
  4. +1 −0 d
@@ -36,7 +36,7 @@ echo "Using data in: ${DATA_DIR}"

mkdir -p "${DATA_DIR}"

docker run -d -p 3000:3000 -v $DATA_DIR:/shared/postgres_data -v $SOURCE_DIR:/src --hostname=discourse --name=discourse_dev --restart=always discourse/discourse_dev:latest /sbin/boot
docker run -d -p 1080:1080 -p 3000:3000 -v $DATA_DIR:/shared/postgres_data -v $SOURCE_DIR:/src --hostname=discourse --name=discourse_dev --restart=always discourse/discourse_dev:latest /sbin/boot

if [ "${initialize}" = "initialize" ]; then
echo "Installing gems..."
@@ -0,0 +1,4 @@
#!/bin/bash

CMD="mailcatcher --http-ip 0.0.0.0 -f || (apt-get install -y libsqlite3-dev && gem install mailcatcher && mailcatcher --http-ip 0.0.0.0 -f)"
docker exec -it discourse_dev /bin/bash -c "$CMD"
@@ -0,0 +1,5 @@
#!/bin/bash

PARAMS="$@"
CMD="cd /src && RAILS_ENV=${RAILS_ENV:=development} bundle exec sidekiq -q critical,low,default"
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD"
1 d

0 comments on commit 97e2a61

Please sign in to comment.
You can’t perform that action at this time.