luckyframework / luckyframework/avram
Remove docker for local tests
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
We should remove docker for local tests. I thought it'd help but it is more of a pain. I pretty much exclusively use crystal on my local machine.
I think next steps are:
* Change script/setup and script/test to use `shards install` and `crystal spec` and not docker
* Remove Dockerfile and related files
* Document how to use `config/database.local.cr` to setup local config
Here is an example of mine:
```crystal
database_name = "avram_test"
TestDatabase.configure do |settings|
settings.credentials = Avram::Credentials.parse?(ENV["DATABASE_URL"]?) || Avram::Credentials.new(
database: database_name,
hostname: ENV["DB_HOST"]? || "localhost",
port: ENV["DB_PORT"]?.try(&.to_i) || 5432,
# Some common usernames are "postgres", "root", or your system username (run 'whoami')
username: ENV["DB_USERNAME"]? || "postgres",
# Some Postgres installations require no password. Use "" if that is the case.
password: ENV["DB_PASSWORD"]? || "postgres"
)
end
```
Or maybe this should be the default, and we should include the `dotenv` shard in development mode so people can set up their vars there. I'd be fine either way
`script/setup` would do something like:
```
shards install
lucky db.setup
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with script/setup and script/test, then inspect the Dockerfile and related Docker files. Compare the proposed shards install, crystal spec, and lucky db.setup flow with config/database.local.cr, and document the local PostgreSQL configuration; done means local tests no longer require Docker and setup instructions are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal, docker, postgresql
- Domain
- build-system, databases, devops, documentation, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100