mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 07:38:45 -05:00
docker dev binaries
This commit is contained in:
parent
fbb6eba252
commit
2c4f290786
7 changed files with 53 additions and 0 deletions
14
bin/docker/boot_dev
Executable file
14
bin/docker/boot_dev
Executable file
|
@ -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
|
5
bin/docker/bundle
Executable file
5
bin/docker/bundle
Executable file
|
@ -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"
|
5
bin/docker/psql
Executable file
5
bin/docker/psql
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
PARAMS="$@"
|
||||
CMD="chpst -u postgres psql $PARAMS"
|
||||
docker exec -it discourse_dev /bin/bash -c "$CMD"
|
9
bin/docker/rails
Executable file
9
bin/docker/rails
Executable file
|
@ -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"
|
5
bin/docker/rake
Executable file
5
bin/docker/rake
Executable file
|
@ -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"
|
12
bin/docker/reset_db
Executable file
12
bin/docker/reset_db
Executable file
|
@ -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/*"
|
3
bin/docker/shutdown_dev
Executable file
3
bin/docker/shutdown_dev
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker rm -f discourse_dev
|
Loading…
Reference in a new issue