Skip to content

Commit

Permalink
Added util scripts for development
Browse files Browse the repository at this point in the history
  • Loading branch information
spikelynch committed Jul 26, 2019
1 parent e6d5eab commit b31eeec
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions attach.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/sh
#Attach a shell to nginx
NGINX_PS=$(docker ps -f name=ocflmount -q)
docker exec -it $NGINX_PS /bin/bash -c 'exec "${SHELL:-sh}"'
6 changes: 6 additions & 0 deletions logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# Follow logs

NGINX_PS=$(docker ps -f name=ocflmount -q)
docker container logs -f $NGINX_PS
6 changes: 6 additions & 0 deletions stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/sh
# stop and remove the ocflmount container

NGINX_PS=$(docker ps -f name=ocflmount -q)
docker stop $NGINX_PS
docker rm $NGINX_PS
8 changes: 8 additions & 0 deletions up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

OCFL_DIR=/Users/mike/working/redbox/ocfl-nginx/test_repos/

docker run -d --name ocflmount \
--mount type=bind,source=${OCFL_DIR},target=/etc/share/nginx/html \
-p 8080:8080 \
$1

0 comments on commit b31eeec

Please sign in to comment.