-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs and move cli dependencies to a container (#58)
* update docs and moved cli deps into a container * fmt * fix the ci
- Loading branch information
1 parent
c7a9e6b
commit d094107
Showing
8 changed files
with
747 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# subscribed.dev | ||
# Subscribed | ||
|
||
[![main](https://github.com/subscribeddotdev/subscribed-backend/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/subscribeddotdev/subscribed-backend/actions/workflows/main.yml) | ||
|
||
|
@@ -12,23 +12,34 @@ Subscribed is a webhook provider that allows software developers to quickly add | |
|
||
> In early-stage development of a Webhooks provider platform... things will change, a lot. | ||
## Local setup | ||
## Getting started | ||
|
||
### Pre-requisites (tools) | ||
### Requirements | ||
|
||
- Docker | ||
- [Docker](https://docker.com) and [Docker Compose](https://docs.docker.com/compose/) | ||
- [Taskfile](https://taskfile.dev): An alternative to Make used to run custom tasks defined in [./Taskfile.yml](./Taskfile.yml) | ||
|
||
### Running the project locally | ||
### Setup | ||
|
||
``` | ||
docker-compose up -d | ||
``` | ||
1. Clone the repository `git clone [email protected]:subscribeddotdev/subscribed-backend.git` | ||
2. Build the container with all the CLI tools that this repo depends on: `task setup` | ||
3. Run the project: `task run` | ||
4. View logs: `task logs` | ||
|
||
And then | ||
## Running tests: | ||
|
||
``` | ||
task logs | ||
``` | ||
- Running unit and integration tests `task test` | ||
- Running component tests `task test:component` | ||
- Running all tests `task test:all` | ||
|
||
That alone should be enough to boot up the app in development inside a docker container with live-reloading enabled. | ||
### Other operations: | ||
|
||
- Running migrations upwards `task mig:up` | ||
- Running migrations downwards `task mig:down` | ||
- Generating handlers from the Open API spec `task openapi` | ||
- Generating ORM models `task orm` | ||
- Generating models from the event specification `task events` | ||
|
||
## License | ||
|
||
[GNU Affero General Public License v3.0](./LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM golang:1.22.3 | ||
|
||
# SQLBoiler (ORM) | ||
RUN go install github.com/volatiletech/sqlboiler/v4@latest | ||
RUN go install github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql@latest | ||
|
||
# Goose for SQL Migrations | ||
RUN go install github.com/pressly/goose/v3/cmd/goose@latest | ||
|
||
# Open API Code Generator | ||
RUN go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest | ||
|
||
# Golang linter | ||
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.22.3 | ||
|
||
# Protocol Buffers Compiler & plugins | ||
RUN apt update | ||
RUN apt install -y protobuf-compiler | ||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | ||
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.