Development
Technologies
- Programming language: Haskell
- Dependency management: Stack
- Backend: SQLite
- Database access: sqlite-simple
- Command line parsing: Optparse Applicative
- Formatting: Prettyprinter
- Prelude: Protolude
- IDs: ULID
- Desktop App: Declarative GTK
Check out the makefile for all development tasks
Ghcid
Ghcid with color output for GHC 8.4 (probably obsolete in 8.6):
ghcid \
--command="stack ghci --ghci-options=-fdiagnostics-color=always"
HLint
hlint \
--ignore="Redundant do" \
--ignore="Use list literal" \
--ignore="Use String" \
--ignore="Redundant bracket" \
--ignore="Use camelCase" \
.
Webapp
Build Images
Build base image for webapp runtime image:
docker build \
--file tasklite-core/dockerfiles/haskell-datasette \
--tag haskell-datasette \
dockerfiles
Build runtime image:
stack image container
docker tag adius/tasklite-tasklite:latest adius/tasklite:latest
Deployment
On Google Cloud:
docker tag adius/tasklite-tasklite:latest gcr.io/deploy-219812/tasklite:latest
docker push gcr.io/deploy-219812/tasklite:latest
kubectl create -f kubernetes/deployment.yaml
kubectl port-forward tasklite-deployment-77884ff4f6-66sjf 8001
Open 127.0.0.1:8001
docker build \
--file dockerfiles/nginx-proxy \
--tag gcr.io/deploy-219812/nginx-proxy:latest \
dockerfiles; \
and docker push gcr.io/deploy-219812/nginx-proxy:latest; \
and kubectl replace --filename kubernetes/deployment.yaml --force; \
and sleep 8;
and kubectl port-forward \
(kubectl get pods --selector app=tasklite --output name) 8080
Afterwards change the health check URL to /healthcheck
for the load balancer at
https://console.cloud.google.com/compute/healthChecks.