Skip to content

Commit

Permalink
Add launchpad
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel376 committed Apr 3, 2024
1 parent ceb7202 commit 55dc68c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ pgcli:
deploy:
cd ops && ansible-playbook deploy.yml -i hosts

init:
npm install
mkdir -p resources/config
touch resources/config/secrets.edn

dev:
npm run dev

Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

YAY! This project has been funded by ClojuristsTogether: https://www.clojuriststogether.org/news/q3-2021-funding-announcement/

This is a v2 of [clojurians-log-app](https://github.com/clojureverse/clojurians-log-app)
This is a v2 of [clojurians-log-app](https://github.com/clojureverse/clojurians-log-app)

## Why v2?

Expand Down Expand Up @@ -30,10 +30,10 @@ archive to update), permalinks to threads/conversations
- improve performance & reduce resource consumption so we can
run this on a much smaller instance
- better statistics reporting (automated stats email to admins/staff)
- open analytics
- open analytics
- support for images and attachments
- fix all of the SEO issues (internal links showing up on google, better indexing, etc)
- more documentation to make it even more easier for folks to contribute
- more documentation to make it even more easier for folks to contribute
- possibly automated email digests tracking specific keywords
- slack-bot custom commands
- delete / anonymise a user
Expand All @@ -53,7 +53,7 @@ more about this:

*Some cons of SSG*:
- regenerating pages on delete events (these can go back upto a few weeks)
- regenerating pages on new reactions added
- regenerating pages on new reactions added
- incremental generation is hard
- generating links (which date preceed and succeed #channel-foo on 2021-05-30
which have existing messages)
Expand Down Expand Up @@ -84,28 +84,27 @@ the way we log currently.

## Development

* For first time setup, run `make init`
* To start css watchers, run `make dev`
* To start postgres db, run `docker compose up`
Use `launchpad` to run the database + app, and launch a REPL connected to your Emacs server:

To jack-in to a clojure repl and run `(go)` to start the local http server at http://localhost:8000

``` sh
$ clj -A:dev
> (go)
```sh
bin/launchpad dev --emacs --go
```

To use psql on the docker postgres
The app will run at http://localhost:8000.

To start css watchers, run `make dev`.

To use psql on the docker postgres:

``` sh
docker compose exec -it db psql -U myuser clojurians_log
```

To use pgcli instead
To use pgcli instead:

``` sh
pip install -U pgcli
make pgcli
make pgcli
# if it asks for a pass enter "mypass"
```

Expand Down
1 change: 1 addition & 0 deletions bb.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{:deps {com.lambdaisland/launchpad {:mvn/version "0.28.129-alpha"}}}
11 changes: 11 additions & 0 deletions bin/launchpad
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bb

(require
'[lambdaisland.launchpad :as launchpad])

(launchpad/main
{:middleware []
:eval-forms []
:pre-steps
[(launchpad/run-process {:cmd '[npm install]})
(launchpad/run-process {:cmd '[docker compose up -d --no-recreate]})]})

0 comments on commit 55dc68c

Please sign in to comment.