You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running docker compose & make sure you have installed docker in your machine
docker compose up -d
Migrate database
migrate -path database/migrations -database "postgres://user:password@localhost:5432/dbname?sslmode=disable" up
Start application using docker for development
Using go live reload & add to Dockerfile
FROM golang:alpine3.21
WORKDIR /app
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they changeCOPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
CMD ["air", "-c", ".air.toml"]
Initialize the .air.toml configuration file
air init
Change build commad to cmd/web directory in .air.toml file