Skip to content

Commit

Permalink
Simplified using custom profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Daerdemandt committed Jun 10, 2016
1 parent 3f85ab2 commit 69cc8a8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ yasp.sql
Procfile.dev

docker-compose.override.yml
profiles/custom.json
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Does not set up Cassandra

# You don't usually need to edit this file.
# If it does not fit your personal use case, docker-compose.override.yml is a preferred way to go.

version: '2'
services:
db:
Expand All @@ -12,7 +15,11 @@ services:
network_mode: host
web:
build: .
command: ./docker/main-launch.sh basic # change 'basic' to 'everything' to launch all services
# 'basic' to launch basic configuration as in profiles/basic.json
# 'everything' to launch all the services as in profiles/everything.json
# 'custom-profile' to launch all services as in profiles/custom.json (you'll have to provide it)
# or just override the whole command with your script if existing does not fit your needs
command: ./docker/main-launch.sh basic
ports:
- "5000"
volumes:
Expand Down
6 changes: 5 additions & 1 deletion docker/main-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# main-launch.sh
# Script run in the main container
# If this scripts exits, so does the main container
# If this script exits, so does the main container

npm run build

Expand All @@ -14,6 +14,10 @@ case $1 in
'everything')
pm2 start profiles/everything.json
;;
'custom-profile')
# To use this option you'll have to provide your custom.json profile. It's gitignored.
pm2 start profiles/custom.json
;;
*)
pm2 start profiles/everything.json
;;
Expand Down

0 comments on commit 69cc8a8

Please sign in to comment.