-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12875 from macanudo527/docker/upgrade_to_dockerv2
Use Dockerv2
- Loading branch information
Showing
14 changed files
with
49 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,12 +14,12 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
- run: docker/build | ||
- run: docker-compose up --detach | ||
- run: docker compose up --detach | ||
- run: until curl -f -s http://localhost:3000; do echo "waiting for api server"; sleep 1; done | ||
- run: docker-compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="update spree_users set spree_api_key='testing' where login='[email protected]'" | ||
- run: docker compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="update spree_users set spree_api_key='testing' where login='[email protected]'" | ||
# equivalent to Flipper.enable(:api_v1) | ||
- run: docker-compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="insert into flipper_features (key, created_at, updated_at) values ('api_v1', localtimestamp, localtimestamp)" | ||
- run: docker-compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="insert into flipper_gates (feature_key, key, value, created_at, updated_at) values ('api_v1', 'boolean', 'true', localtimestamp, localtimestamp)" | ||
- run: docker compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="insert into flipper_features (key, created_at, updated_at) values ('api_v1', localtimestamp, localtimestamp)" | ||
- run: docker compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="insert into flipper_gates (feature_key, key, value, created_at, updated_at) values ('api_v1', 'boolean', 'true', localtimestamp, localtimestamp)" | ||
|
||
# Run Mayhem for API | ||
- name: Run Mayhem for API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/bash | ||
set +e | ||
|
||
docker-compose down -v --remove-orphans | ||
docker compose down -v --remove-orphans | ||
wait | ||
echo '###########################' | ||
echo 'BEGIN: docker-compose build' | ||
echo 'BEGIN: docker compose build' | ||
echo '###########################' | ||
docker-compose build # Set up the Docker containers | ||
docker compose build # Set up the Docker containers | ||
echo '##############################' | ||
echo 'FINISHED: docker-compose build' | ||
echo 'FINISHED: docker compose build' | ||
echo '##############################' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Write-Host "Docker cleaning: remove old containers" -ForegroundColor Blue | ||
docker-compose.exe down -v --remove-orphans | ||
docker compose down -v --remove-orphans | ||
Write-Host "Docker build: set up the docker containers" -ForegroundColor Blue | ||
docker-compose.exe build | ||
docker compose build | ||
Write-Host "Docker build finished" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This script runs RuboCop | ||
|
||
Write-Host "bundle exec rubocop : runs rubocop" -ForegroundColor Blue | ||
docker-compose.exe run web bundle exec rubocop | ||
docker compose run web bundle exec rubocop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
#!/bin/bash | ||
|
||
echo '--------------------------------------------------------------' | ||
echo 'BEGIN: docker-compose run web bundle exec rake db:test:prepare' | ||
echo 'BEGIN: docker compose run web bundle exec rake db:test:prepare' | ||
echo '--------------------------------------------------------------' | ||
docker-compose run web bundle exec rake db:test:prepare | ||
docker compose run web bundle exec rake db:test:prepare | ||
echo '------------------------------------------------------------' | ||
echo 'END: docker-compose run web bundle exec rake db:test:prepare' | ||
echo 'END: docker compose run web bundle exec rake db:test:prepare' | ||
echo '------------------------------------------------------------' | ||
|
||
echo '--------------------------------------' | ||
echo 'BEGIN: running test suite (quiet mode)' | ||
echo '--------------------------------------' | ||
docker-compose run web bundle exec rspec spec | grep -v 'DEPRECATION WARNING' | grep -v 'Post.includes(:comments)' | grep -v 'Currently, Active Record recognizes the table in the string' | grep -v "If you don't rely on implicit join references" | ||
docker compose run web bundle exec rspec spec | grep -v 'DEPRECATION WARNING' | grep -v 'Post.includes(:comments)' | grep -v 'Currently, Active Record recognizes the table in the string' | grep -v "If you don't rely on implicit join references" | ||
echo '------------------------------------' | ||
echo 'END: running test suite (quiet mode)' | ||
echo '------------------------------------' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This script launches the whole stack of containers (web server, database, webpack, redis, etc.) | ||
$DateTime=Get-Date -Format "yyyyMMdd-HHmmss" | ||
|
||
Write-Host "Docker-compose up: launches the whole stack of containers" -ForegroundColor Blue | ||
docker-compose.exe up -d > log/server-$DateTime.log 2>&1 | ||
Write-Host "Docker-compose up finished : View this app in your web browser at http://localhost:3000/" -ForegroundColor Blue | ||
Write-Host "Docker compose up: launches the whole stack of containers" -ForegroundColor Blue | ||
docker compose up -d > log/server-$DateTime.log 2>&1 | ||
Write-Host "Docker compose up finished : View this app in your web browser at http://localhost:3000/" -ForegroundColor Blue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters