docker dev binaries
This commit is contained in:
parent
fbb6eba252
commit
2c4f290786
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
pushd `dirname $0` > /dev/null
|
||||
SCRIPTPATH=`pwd -P`
|
||||
popd > /dev/null
|
||||
|
||||
|
||||
SOURCE_DIR=`(cd $SCRIPTPATH && cd ../../ && pwd)`
|
||||
DATA_DIR=$SOURCE_DIR/tmp/postgres
|
||||
|
||||
echo $SOURCE_DIR
|
||||
echo $DATA_DIR
|
||||
|
||||
docker run -d -p 3000:3000 -v $DATA_DIR:/shared/postgres_data -v $SOURCE_DIR:/src --hostname=discourse_dev --name=discourse_dev --restart=always discourse/dev /sbin/boot
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
PARAMS="$@"
|
||||
CMD="cd /src && HOME=/home/discourse chpst -u discourse:discourse bundle $PARAMS"
|
||||
docker exec -it discourse_dev /bin/bash -c "$CMD"
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
PARAMS="$@"
|
||||
CMD="chpst -u postgres psql $PARAMS"
|
||||
docker exec -it discourse_dev /bin/bash -c "$CMD"
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
PARAMS="$@"
|
||||
if [[ $# = 1 ]] && [[ "$1" =~ "s" ]];
|
||||
then
|
||||
PARAMS="$PARAMS -b 0.0.0.0"
|
||||
fi
|
||||
CMD="cd /src && HOME=/home/discourse RAILS_ENV=${RAILS_ENV:=development} chpst -u discourse:discourse rails $PARAMS"
|
||||
docker exec -it discourse_dev /bin/bash -c "$CMD"
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
PARAMS="$@"
|
||||
CMD="cd /src && HOME=/home/discourse RAILS_ENV=${RAILS_ENV:=development} chpst -u discourse:discourse rake $PARAMS"
|
||||
docker exec -it discourse_dev /bin/bash -c "$CMD"
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
pushd `dirname $0` > /dev/null
|
||||
SCRIPTPATH=`pwd -P`
|
||||
popd > /dev/null
|
||||
|
||||
|
||||
SOURCE_DIR=`(cd $SCRIPTPATH && cd ../../ && pwd)`
|
||||
DATA_DIR=$SOURCE_DIR/tmp/postgres
|
||||
|
||||
|
||||
docker run -it -v $DATA_DIR:/shared/postgres_data samsaffron/discourse_dev:1.0.13 /bin/bash -c "rm -fr /shared/postgres_data/*"
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker rm -f discourse_dev
|
Loading…
Reference in New Issue