-
Notifications
You must be signed in to change notification settings - Fork 73
[Feature][DX] Add Docker Configuration for Development #109
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7ae7665
Fixes https://github.com/DatabaseCleaner/database_cleaner-active_reco…
etagwerker 35e666b
Add docker configuration for development
etagwerker 842b19d
Add a development section for contributors
etagwerker ab0fce4
Added ruby service to make it easier to get started with your contrib…
etagwerker c0fe3ec
Update password to match Docker configuration
etagwerker 240f351
Removed outdated docker-compose file
etagwerker 85896e4
Use older mysql to avoid trilogy error, fix docker compose and instru…
arielj 9b77d0c
Update readme to point to CONTRIBUTE.md file
arielj 4f69ba7
Run ./bin/setup so that we have the config file in place for tests
etagwerker b0f6c33
Relax dependency
etagwerker 54dd580
Add a line about the Docker + DX change
etagwerker 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ARG RUBY_VERSION=3.3 | ||
| FROM ruby:${RUBY_VERSION} | ||
|
|
||
| # Set the working directory in the container | ||
| WORKDIR /app | ||
|
|
||
| # Copy the current directory contents into the container at /app | ||
| # This is copied so we can bundle the application, but it's replaced | ||
| # by a mounted volume with the current code when executed with docker compose | ||
| COPY . /app | ||
|
|
||
| ARG BUNDLE_GEMFILE=Gemfile | ||
| ENV BUNDLE_GEMFILE=${BUNDLE_GEMFILE} | ||
|
|
||
| # Install any needed packages specified in Gemfile | ||
| RUN ./bin/setup | ||
|
|
||
| # Command to run the application | ||
| CMD ["bash"] |
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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| services: | ||
| postgres: | ||
| image: postgres:16 # specify the version needed for a given app | ||
| environment: | ||
| - POSTGRES_PASSWORD=postgres # this is required | ||
| ports: | ||
| - "127.0.0.1:5432:5432" # so we can use `localhost` as the host | ||
| mysql: | ||
| image: mysql:5.7 | ||
| environment: | ||
| - MYSQL_ROOT_PASSWORD=mysql | ||
| ports: | ||
| - "127.0.0.1:3306:3306" | ||
| redis: | ||
| image: redis:6.2-alpine | ||
| restart: always | ||
| ports: | ||
| - "127.0.0.1:6379:6379" | ||
| command: redis-server --save 20 1 --loglevel warning |
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 |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| mysql2: | ||
| adapter: mysql2 | ||
| database: database_cleaner_test | ||
| username: root | ||
| password: mysql | ||
| host: mysql | ||
| port: 3306 | ||
| encoding: utf8 | ||
|
|
||
| trilogy: | ||
| adapter: trilogy | ||
| database: database_cleaner_test | ||
| username: root | ||
| password: mysql | ||
| host: mysql | ||
| port: 3306 | ||
| encoding: utf8 | ||
|
|
||
| postgres: | ||
| adapter: postgresql | ||
| database: database_cleaner_test | ||
| username: postgres | ||
| password: postgres | ||
| host: postgres | ||
| encoding: unicode | ||
| template: template0 | ||
|
|
||
| sqlite3: | ||
| adapter: sqlite3 | ||
| database: tmp/database_cleaner_test.sqlite3 | ||
| pool: 5 | ||
| timeout: 5000 | ||
| encoding: utf8 |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created an feature request in the core repo DatabaseCleaner/database_cleaner#722
with that we could replace the sample file to support ENV variables and then define password/host with the docker-compose file to not need a second sample file here just for docker