From 69cc8a8fd311d147cd89e42ea69514c468a620bf Mon Sep 17 00:00:00 2001 From: Roman Kuzmichev Date: Fri, 10 Jun 2016 13:52:39 +0300 Subject: [PATCH] Simplified using custom profiles --- .gitignore | 1 + docker-compose.yml | 9 ++++++++- docker/main-launch.sh | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b1b563a52..2e861512b 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ yasp.sql Procfile.dev docker-compose.override.yml +profiles/custom.json diff --git a/docker-compose.yml b/docker-compose.yml index 64b9106ec..45b14c618 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: @@ -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: diff --git a/docker/main-launch.sh b/docker/main-launch.sh index cb3459573..bdb16c2de 100755 --- a/docker/main-launch.sh +++ b/docker/main-launch.sh @@ -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 @@ -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 ;;