Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update local docker setup so it builds and registers with the Control Tower correctly #14

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion authorization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ case "$1" in
start)
yarn start
;;
develop)
type docker-compose >/dev/null 2>&1 || { echo >&2 "docker-compose is required but it's not installed. Aborting."; exit 1; }
docker-compose -f docker-compose-develop.yml build && docker-compose -f docker-compose-develop.yml up --abort-on-container-exit
;;
test)
type docker-compose >/dev/null 2>&1 || { echo >&2 "docker-compose is required but it's not installed. Aborting."; exit 1; }
docker-compose -f docker-compose-test.yml build && docker-compose -f docker-compose-test.yml up --abort-on-container-exit
;;
*)
echo "Usage: authorization.sh {start|test}" >&2
echo "Usage: authorization.sh {start|test|develop}" >&2
exit 1
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion dev.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DEBUG=redis-cache-plugin
PUBLIC_URL=http://authorization.dev:9000
MONGO_PORT_27017_TCP_ADDR=mongo
REDIS_PORT_6379_TCP_ADDR=redis
REDIS_PORT_6379_TCP_PORT=16379
REDIS_PORT_6379_TCP_PORT=6380
SPARKPOST_KEY=fakeSparkpostKey
TEST_GOOGLE_OAUTH2_CLIENT_ID=
TEST_FACEBOOK_OAUTH2_APP_ID=
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
develop:
build: .
ports:
- "9000:9000"
- "9001:9001"
container_name: authorization
env_file:
- dev.env
Expand All @@ -17,13 +17,13 @@ services:
image: mongo:3.6.13
container_name: authorization-mongo
ports:
- "27017"
- "27018:27017"
volumes:
- $HOME/docker/authorization/mongodb:/data/db
restart: always
redis:
image: redis
container_name: authorization-redis
ports:
- "16379:6379"
- "6380:6379"
restart: always
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
set -e

case "$1" in
develop)
echo "Running Develop"
exec yarn watch
;;
test)
echo "Running Test"
exec yarn test
Expand Down