-
Notifications
You must be signed in to change notification settings - Fork 5
Docker improvements #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Docker improvements #620
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
eeb85e9
Bump docker postgres to v17
danhalson f172284
Add a healthcheck to the db container and ensure the api depends on that
danhalson 2ba55b5
Move the bundle and node_moduels to volumes for easier installs, auto…
danhalson 32959a4
Add an example override and update docs for dev containers
danhalson 466a3a0
Force copilot to be installed to prevent corrupted state resulting in…
danhalson 63265aa
Remove postCreate
danhalson a3ac6b5
Correct override example to use node-modules
danhalson f23d08a
Fix override example file
danhalson 9ddbff3
Using node_modules as the real thing is named node_modules
danhalson 565e417
Merge branch 'main' into danhalson/docker-improvements
adrian-rpf d8cae8b
Should also use underscore
danhalson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,15 @@ | ||
| #!/bin/bash | ||
| set -euo pipefail # Use strict-mode in based to ensure errors are surfaced early | ||
|
|
||
| rails db:prepare | ||
| rdbg -n -o -c -- bin/rails s -p 3009 -b '0.0.0.0' | ||
| # Check if bundle install needs to be run | ||
| bundle check >/dev/null 2>&1 || bundle install --jobs "${BUNDLE_JOBS:-4}" | ||
|
|
||
| # Check if yarn install needs to be run | ||
| if [ -f package.json ] && command -v yarn >/dev/null 2>&1; then | ||
| yarn install --check-files --frozen-lockfile || yarn install --check-files | ||
| fi | ||
|
|
||
| # Prepare the database | ||
| bundle exec rails db:prepare | ||
|
|
||
| exec rdbg -n -o -c -- bundle exec rails s -p 3009 -b '0.0.0.0' |
This file contains hidden or 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,15 @@ | ||
| #!/bin/bash | ||
| set -euo pipefail # Use strict-mode in based to ensure errors are surfaced early | ||
|
|
||
| rails db:prepare | ||
| rails server --port 3009 --binding 0.0.0.0 | ||
| # Check if bundle install needs to be run | ||
| bundle check >/dev/null 2>&1 || bundle install --jobs "${BUNDLE_JOBS:-4}" | ||
|
|
||
| # Check if yarn install needs to be run | ||
| if [ -f package.json ] && command -v yarn >/dev/null 2>&1; then | ||
| yarn install --check-files --frozen-lockfile || yarn install --check-files | ||
| fi | ||
|
|
||
| # Prepare the database | ||
| bundle exec rails db:prepare | ||
|
|
||
| exec bundle exec rails server --port 3009 --binding 0.0.0.0 |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| services: | ||
| api: | ||
| build: | ||
| context: . | ||
| target: dev-container | ||
| command: bash bin/docker-debug-entrypoint.sh | ||
| volumes: | ||
| # - ${HOME}/.bashrc:/root/.bashrc:ro # Map a ~/.bashrc in your home directory for customising bash | ||
| - ${HOME}/.ssh:/root/.ssh:ro # To share any ssh keys with the container | ||
| - /var/run/docker.sock:/var/run/docker.sock | ||
| - node_modules:/app/node_modules | ||
|
|
||
| volumes: | ||
| node_modules: null |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.