Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 970 Bytes

File metadata and controls

27 lines (19 loc) · 970 Bytes

Development

This project utilizes magefile to automate various development tasks. To view a list of available commands, run mage -l.

Running locally against a kubernetes cluster

    • Local Server: docker run --rm -d -p 5432:5432 --name kube-postgres -e POSTGRES_USER=pgkube-user -e POSTGRES_PASSWORD=pgkube-password postgres:15.4-alpine
    • Existing server in Kubernetes kubectl port-forward svc/postgres 5432:5432
  1. Modify app/.env file. Set DATABASE_URL (e.g. postgres://pgkube-user:pgkube-password@localhost:5432/postgres)
  2. Run locally. cd app && go run ./.... A default context from kubeconfig will be used to connect to kubernetes cluster.

Creating a local kubernetes cluster

mage recreateKindCluster

Testing docker image.

cp magefiles/.env.example magefiles/.env
# Edit .env to match your environment. You may need to create a docker registry.
mage DockerPush
mage KubeApply