Skip to content

Commit

Permalink
Legg til oppsett for å kjøre Datomic transactoren lokalt
Browse files Browse the repository at this point in the history
Co-authored-by: Magnar Sveen <magnar.sveen@mattilsynet.no>
  • Loading branch information
cjohansen and magnars committed Oct 10, 2023
1 parent b3c0040 commit e1955ee
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
/.nrepl-port
/config/local-config.edn
/.clj-kondo/.cache
/.lsp
/.lsp
/datomic-transactor
/datomic-pro-*.zip
/datomic-data/
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
DATOMIC_VERSION=1.0.6735

datomic-transactor:
curl https://datomic-pro-downloads.s3.amazonaws.com/$(DATOMIC_VERSION)/datomic-pro-$(DATOMIC_VERSION).zip -O datomic-pro-$(DATOMIC_VERSION).zip
unzip datomic-pro-$(DATOMIC_VERSION).zip -d datomic-transactor
cp datomic-transactor/datomic-pro-$(DATOMIC_VERSION)/config/samples/dev-transactor-template.properties datomic-transactor/datomic-pro-$(DATOMIC_VERSION)/config/transactor.properties
sed -i '' 's|# data-dir=data|data-dir=../../datomic-data|' datomic-transactor/datomic-pro-$(DATOMIC_VERSION)/config/transactor.properties

start-transactor: datomic-transactor
cd datomic-transactor/datomic-pro-$(DATOMIC_VERSION) && ./bin/transactor config/transactor.properties

test:
clojure -M:dev -m kaocha.runner

.PHONY: test
clean:
rm datomic-pro-$(DATOMIC_VERSION).zip

.PHONY: test start-transactor
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ inn sammenlignet med bilde og video. Ytelsen på søket går fort og fint.

## Hvordan kjører jeg dette lokalt?

Dette oppsettet antar for øyeblikket at du sitter på en Mac.

I skrivende stund har vi bare fyrt opp en Portfolio-site hvor vi kan snekre
sammen komponenter og UI-elementer. Denne kan du kjøre ved å gjøre noe slikt:

Expand All @@ -52,4 +54,10 @@ sammen komponenter og UI-elementer. Denne kan du kjøre ved å gjøre noe slikt:
clj -M:ui -m figwheel.main -b ui
```

- [Besøk siden](http://localhost:5050/)
- [Se på UI-komponentene](http://localhost:5050/)

- Kjør opp databasen

```
make start-transactor
```

0 comments on commit e1955ee

Please sign in to comment.