Skip to content

Commit

Permalink
v0.0.3-beta (#8)
Browse files Browse the repository at this point in the history
* v0.0.3-beta

* v0.0.3-beta

* v0.0.3-beta

* v0.0.3-beta

* v0.0.3-beta
  • Loading branch information
yangkenneth authored Oct 17, 2023
1 parent efcc6fd commit 181ca40
Show file tree
Hide file tree
Showing 110 changed files with 1,773 additions and 843 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.github/
config/
docs/
examples/
pkg/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha
# Build and push Docker image with Buildx (don't push on PR)
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ RUN adduser --home /home/baseca baseca --gecos "baseca" --disabled-password && \
rm -rf /var/cache/apk/*

COPY --from=builder /baseca/target/bin/linux/baseca /home/baseca/baseca
COPY --from=builder /baseca/internal/authorization/casbin /home/baseca/internal/authorization/casbin
COPY --from=builder /baseca/internal/attestor/aws_iid/certificate /home/baseca/internal/attestor/aws_iid/certificate
COPY --from=builder /baseca/config /home/baseca/config

RUN chown -R baseca:baseca /home/baseca

Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ test: info clean dependencies

.PHONY: build
build: info clean
@ GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o $(BIN)/darwin/$(SERVICE) cmd/server/main.go
@ GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o $(BIN)/linux/$(SERVICE) cmd/server/main.go
@ GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o $(BIN)/darwin/$(SERVICE) cmd/baseca/server.go
@ GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o $(BIN)/linux/$(SERVICE) cmd/baseca/server.go

.PHONY: sqlc
sqlc:
Expand All @@ -47,15 +47,17 @@ gen: info clean
.PHONY: server
server:
@ database_credentials=${DATABASE_CREDENTIALS} \
go run cmd/server/main.go
go run cmd/baseca/server.go

.PHONY: lint
lint:
@ golangci-lint run

.PHONY: tools
tools:
@ go install go.uber.org/mock/mockgen@latest
@ go install google.golang.org/protobuf/cmd/[email protected]
@ go install google.golang.org/grpc/cmd/[email protected]
@ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
@ which buf || (go install github.com/bufbuild/buf/cmd/buf@latest)

8 changes: 3 additions & 5 deletions cmd/server/main.go → cmd/baseca/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import (
"time"

"github.com/coinbase/baseca/internal/config"
"github.com/coinbase/baseca/internal/environment"
"github.com/coinbase/baseca/internal/gateway/grpc"
"github.com/coinbase/baseca/internal/validator"
"github.com/coinbase/baseca/internal/gateway"
"github.com/coinbase/baseca/internal/lib/util/validator"
_ "github.com/lib/pq"
"go.uber.org/fx"
"go.uber.org/fx/fxevent"
Expand All @@ -19,8 +18,7 @@ func main() {
app := fx.New(
fx.Options(
config.Module,
environment.Module,
grpc.Module,
gateway.Module,
validator.Module,
),
fx.WithLogger(
Expand Down
69 changes: 0 additions & 69 deletions cmd/server/baseca/server.go

This file was deleted.

2 changes: 2 additions & 0 deletions config/config.primary.development.aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ acm_pca:
ca_active_day: 90
assume_role: false
root_ca: false
default: true
development_usw1:
region: us-west-1
ca_arn: arn:aws:acm-pca:us-west-1:123456789012:certificate-authority/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
ca_active_day: 90
assume_role: false
default: false

firehose:
stream: baseca-development
Expand Down
1 change: 1 addition & 0 deletions config/config.primary.production.aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ acm_pca:
ca_active_day: 90
assume_role: false
root_ca: false
default: true

# Configure Additional Certificate Authorities (development_use1, staging_use1, etc)

Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 181ca40

Please sign in to comment.