add wrappers for mailcatcher and sidekiq

add symlink to simplify invoking docker commands `d/rake`
This commit is contained in:
Sam 2016-12-13 09:05:45 +11:00
parent 600541c623
commit 97e2a614c8
4 changed files with 11 additions and 1 deletions

View File

@ -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..."

4
bin/docker/mailcatcher Executable file
View File

@ -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"

5
bin/docker/sidekiq Executable file
View File

@ -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 Symbolic link
View File

@ -0,0 +1 @@
bin/docker