Skip to content

Commit adc26b8

Browse files
committed
Changed the development make setup to task
1 parent 5808cd2 commit adc26b8

3 files changed

Lines changed: 261 additions & 183 deletions

File tree

‎Makefile‎

Lines changed: 0 additions & 169 deletions
This file was deleted.

‎README.md‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,29 @@ Live application is available at https://hackorum.dev
66

77
## Development
88

9-
Both Docker and Podman (rootless) are supported. The Makefile auto-detects which runtime is available (preferring Podman). Override with `ENGINE=docker` or `ENGINE=podman`.
9+
Commands are run via [Task](https://taskfile.dev) (`task <name>`; run `task` with no arguments to list them). Both Docker and Podman (rootless) are supported. The Taskfile auto-detects which runtime is available (preferring Podman). Override with `ENGINE=docker` or `ENGINE=podman`.
1010

1111
1) Copy the sample env and adjust as needed:
1212
```bash
1313
cp .env.development.example .env.development
1414
```
1515
2) Build and start the stack (web + Postgres):
1616
```bash
17-
make dev
17+
task dev
1818
```
1919
* App: http://localhost:3000
2020
* Postgres: localhost:15432 (user/password: hackorum/hackorum by default)
2121
* Emails sent by the application use `letter_opener`, will be opened by the browser automatically
2222
* If you run into a Postgres data-dir warning, clear the old volume: `docker volume rm hackorum_db-data` (or `podman volume rm hackorum_db-data`)
2323

2424
Useful commands:
25-
* Shell: `make shell`
26-
* Rails console: `make console`
27-
* Migrations/seeds: `make db-migrate` (or run arbitrary commands via `make shell`)
28-
* Tests: `make test`
29-
* Import a public DB dump: `make db-import DUMP=/path/to/public-YYYY-MM.sql.gz`
30-
* If you need private table definitions too, apply `private-schema-YYYY-MM.sql.gz` after the import:
31-
`gzip -cd /path/to/private-schema-YYYY-MM.sql.gz | make psql`
32-
* Other targets: `make dev-detach` / `make down` / `make logs` / `make db-reset` / `make psql`
25+
* Shell: `task shell`
26+
* Rails console: `task console`
27+
* Migrations/seeds: `task db-migrate` (or run arbitrary commands via `task shell`)
28+
* Tests: `task test` (pass args after `--`, e.g. `task test -- spec/models`)
29+
* Import a DB dump: `task db-import SCHEMA=/path/to/schema-YYYY-MM.sql.gz PUBLIC_DATA=/path/to/public-data-YYYY-MM.sql.gz`
30+
* If you need private data too, add `PRIVATE_DATA=/path/to/private-data-YYYY-MM.sql.gz` to the same command
31+
* Other targets: `task dev-detach` / `task down` / `task logs` / `task db-reset` / `task psql`
3332

3433
Public database dumps (schema + public data) are published at https://dumps.hackorum.dev/
3534

@@ -38,16 +37,16 @@ Public database dumps (schema + public data) are published at https://dumps.hack
3837
There are two helper scripts `script/simulate_email_once.rb` and `simulate_email_stream.rb` that simulate incoming emails.
3938
The scripts can be configured by a few environment variables, for details see the source of the scripts.
4039

41-
Makefile shortcuts:
42-
* `make sim-email-once`
43-
* `make sim-email-stream`
40+
Task shortcuts:
41+
* `task sim-email-once`
42+
* `task sim-email-stream`
4443

4544
### IMAP worker
4645

4746
The "production" IMAP worker which pulls actual mailing list messages from an IMAP label can be also run locally.
4847

4948
```bash
50-
make imap
49+
task imap
5150
```
5251
Configure IMAP via `.env.development` (`IMAP_USERNAME`, `IMAP_PASSWORD`, `IMAP_MAILBOX_LABEL`, `IMAP_HOST`, `IMAP_PORT`, `IMAP_SSL`).
5352

0 commit comments

Comments
 (0)