Merged in feature/devbox (pull request #11)

Add Devbox

* adddevbox

* cleanupdockerfile

* testscripts
This commit is contained in:
Michael McGuinness
2025-01-10 12:58:14 +00:00
parent 0ebb8a21a1
commit 6e5c7aedc8
127 changed files with 1371 additions and 811 deletions
+14 -37
View File
@@ -1,46 +1,23 @@
# Go Template
# Query Orchestration
This repository is a template for golang projects with the assumption that is being run in a linux-based environment.
This repository contains the DoczyAI code.
Using the following project as a baseline: https://github.com/golang-standards/project-layout.
## Set Up
## Installation and Usage
### gRPC API
Remove queue folders, and bring grpc into super directory.
### AWS SQS Listener
Remove grpc folders, and bring queue into super directory.
### gRPC Gateway
Set up gRPC Gateway: https://github.com/grpc-ecosystem/grpc-gateway
## Installation
- Install golang: `https://go.dev/doc/install`
- Add to ~/.profile or equivalent:
```
PATH=$PATH:/usr/local/go/bin
PATH=$PATH:$(go env GOPATH)/bin
```
- Restart terminal
- Install protoc: `https://grpc.io/docs/protoc-installation/`
- Ubuntu: `apt install -y protobuf-compiler`
- MacOS: `brew install protobuf`
- Install shellcheck
- Ubuntu: `apt install -y shellcheck`
- Ensure user in docker group and docker group is in sudo group
- Install devbox: `https://www.jetify.com/docs/devbox/installing_devbox`
- Ubuntu/MacOS: `curl -fsSL https://get.jetify.com/devbox | bash`
- Run `devbox shell` to enter the environment
- Create `.env` file to add environment variables
- Run `direnv allow` to ensure environment variables are populated
- Run `task deps:download` to download code dependencies
- (IF NECESSARY) Ensure user in docker group and docker group is in sudo group
```
sudo groupadd docker
sudo usermod -aG docker $USER
```
- Run: `./scripts/install-deps.sh`
- Add to ~/.profile or equivalent:
```
eval "$(direnv hook bash)"
```
- Restart terminal
- Create `.env` file to add environment variables
To find new packages: `https://search.nixos.org/packages`
For regular usage, please use `task` scripts in order run the most appropriate configuration.