dockerfile, makefile, todo
This commit is contained in:
parent
7aee94928e
commit
10d9a92b12
3 changed files with 51 additions and 0 deletions
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
FROM hasufell/alpine-haskell:3.16 AS build
|
||||||
|
|
||||||
|
RUN cabal update
|
||||||
|
|
||||||
|
COPY . /app/
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN cabal update
|
||||||
|
RUN cabal build exe:fedi --enable-executable-static
|
||||||
|
RUN strip `cabal list-bin fedi`
|
||||||
|
|
||||||
|
FROM scratch AS artifact
|
||||||
|
COPY --from=build /app/dist-newstyle/build/x86_64-linux/*/*/x/*/build/*/fedi .
|
26
Makefile
Normal file
26
Makefile
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
.PHONY: format
|
||||||
|
format:
|
||||||
|
find ./src -type f -name "*.hs" -exec sh -c 'fourmolu -i {}' \;
|
||||||
|
find ./app -type f -name "*.hs" -exec sh -c 'fourmolu -i {}' \;
|
||||||
|
# find ./test -type f -name "*.hs" -exec sh -c 'fourmolu -i {}' \;
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf ./newdist ./out ./dist-newstyle
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
build: fedi.cabal cabal.project
|
||||||
|
cabal build all --enable-tests --enable-benchmarks
|
||||||
|
|
||||||
|
.PHONY: serve
|
||||||
|
serve:
|
||||||
|
FEDI_DETAILS="test/public/details.json" cabal run fedi -- serve
|
||||||
|
|
||||||
|
.PHONY: insert
|
||||||
|
insert:
|
||||||
|
FEDI_DETAILS="test/public/details.json" cabal run fedi -- insert note.html
|
||||||
|
|
||||||
|
.PHONY: docker
|
||||||
|
docker: fedi.cabal cabal.project clean
|
||||||
|
DOCKER_BUILDKIT=1 docker build -o ./out/ .
|
||||||
|
file out/fedi
|
11
todo.org
Normal file
11
todo.org
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
* Fedi
|
||||||
|
** DONE Outbox of notes
|
||||||
|
** DONE Inbox
|
||||||
|
** DONE Publish
|
||||||
|
** DONE HTTP Signatures
|
||||||
|
** DONE Follow me / Unfollow me
|
||||||
|
** TODO Test http signature
|
||||||
|
** TODO Test outbox
|
||||||
|
** TODO Test inbox + follow
|
||||||
|
** TODO Like my note
|
||||||
|
** TODO Reply to notes
|
Loading…
Add table
Reference in a new issue