Skip to content

Commit

Permalink
[dist] Ignore the docker-compose override file
Browse files Browse the repository at this point in the history
This makes it possible to integrate the building of the frontend
container into compose.
  • Loading branch information
hennevogel committed Oct 5, 2017
1 parent afa9ce4 commit 3bb6c87
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
/src/backend/pm_to_blib
/src/backend/sat-solver
/src/backend/t/tmp
docker-compose.override.yml

# All the other crap that fits nowhere specifically
*~
Expand Down
8 changes: 6 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ namespace :docker do
desc 'Build our development environment'
task :build do
begin
# Setup the frontend container
sh "docker build . -t openbuildservice/frontend --build-arg CONTAINER_USERID=#{CONTAINER_USERID}"
sh "echo -e \"# This file is generated by our Rakefile. Do not change it!\" > docker-compose.override.yml"
# rubocop:disable Metrics/LineLength
sh "echo -e \"version: \'2\'\nservices:\n frontend:\n build:\n args:\n CONTAINER_USERID: #{CONTAINER_USERID}\" >> docker-compose.override.yml"
# rubocop:enable Metrics/LineLength
# Build the frontend container
sh "docker-compose build frontend"
# Bootstrap the app
sh "docker-compose up -d db"
sh "docker-compose run --no-deps --rm frontend bundle exec rake dev:bootstrap RAILS_ENV=development"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ services:
command: /obs/contrib/start_development_worker
frontend:
image: openbuildservice/frontend
build:
context: .
volumes:
- .:/obs
ports:
Expand Down

0 comments on commit 3bb6c87

Please sign in to comment.