Permalink
Browse files

add shell scripts for dev interaction

  • Loading branch information...
vicgarcia committed Dec 19, 2018
1 parent 87bf184 commit e172898a5a76d9fae20937d14da7a78dd3729bc3
Showing with 35 additions and 0 deletions.
  1. +18 −0 docker/django/manage.sh
  2. +17 −0 docker/django/pip.sh
@@ -0,0 +1,18 @@
#!/bin/bash

# use manage.py inside the running container from the host's shell

# enter the django shell
# ./docker/django/manage.sh shell

# work with migrations
# ./docker/django/manage.sh makemigrations
# ./docker/django/manage.sh migrate

ARGS="$@"
if [[ -z $ARGS ]]
then
ARGS="help"
fi

docker-compose exec django python /code/manage.py $ARGS
@@ -0,0 +1,17 @@
#!/bin/bash

# use pip inside the running container from the host's shell

# interact with pip
# ./docker/django/pip.sh install -r requirements.txt --upgrade

# output the requirements.txt
# ./docker/django/pip.sh freeze | dos2unix > requirements.txt

ARGS="$@"
if [[ -z $ARGS ]]
then
ARGS="help"
fi

docker-compose exec django pip $ARGS

0 comments on commit e172898

Please sign in to comment.