Skip to content

Commit

Permalink
Update Docker commands (#126)
Browse files Browse the repository at this point in the history
## 🎫 Ticket

https://jira.cms.gov/browse/...

## 🛠 Changes

<!-- What was added, updated, or removed in this PR? -->

## ℹ️ Context

<!-- Why were these changes made? Add background context suitable for a
non-technical audience. -->

<!-- If any of the following security implications apply, this PR must
not be merged without Stephen Walter's approval. Explain in this section
and add @SJWalter11 as a reviewer.
  - Adds a new software dependency or dependencies.
  - Modifies or invalidates one or more of our security controls.
  - Stores or transmits data that was not stored or transmitted before.
- Requires additional review of security implications for other reasons.
-->

## 🧪 Validation

<!-- How were the changes verified? Did you fully test the acceptance
criteria in the ticket? Provide reproducible testing instructions and
screenshots if applicable. -->
  • Loading branch information
ashley-weaver authored Aug 19, 2024
1 parent b93c931 commit a4b86ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ https://dpc.cms.gov/api/v1*
https://dpc.cms.gov/users/password/edit
https://dpc.cms.gov/users/confirmation
https://pacs.hospital.org/*
https://www.medicaid.gov/
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ig/publish: ${IG_PUBLISHER}
@java -jar ${IG_PUBLISHER} -ig implementation_guide/ig.json

build:
docker-compose -f docker-compose.yml build static_site
docker-compose -f docker-compose.yml run -f static_site
docker compose -f docker-compose.yml build static_site
docker compose -f docker-compose.yml run static_site

serve:
@docker-compose run --publish 4001:4000 --rm --entrypoint "bundle exec jekyll serve -H 0.0.0.0" --volume "./:/dpc-site-static/" static_site
@docker compose run --publish 4001:4000 --rm --entrypoint "bundle exec jekyll serve -H 0.0.0.0" --volume "./:/dpc-site-static/" static_site
6 changes: 3 additions & 3 deletions scripts/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ set -eo pipefail

docker_cleanup()
{
docker-compose down
docker compose down
}

build() {
docker-compose -f docker-compose.yml build static_site
docker compose -f docker-compose.yml build static_site
}

test() {
trap docker_cleanup EXIT
docker-compose run -u "$(id -u "${USER}")":"$(id -g "${USER}")" --publish 4000:4000 --rm --entrypoint "bundle exec jekyll serve -H 0.0.0.0" --name static_site -d static_site
docker compose run -u "$(id -u "${USER}")":"$(id -g "${USER}")" --publish 4000:4000 --rm --entrypoint "bundle exec jekyll serve -H 0.0.0.0" --name static_site -d static_site
sleep 20
docker logs static_site
curl localhost:4000 | grep "Update: what we're working on" || { echo "ERROR: Updates page not found"; exit 1; }
Expand Down

0 comments on commit a4b86ec

Please sign in to comment.