Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
fix: wrong configurations & useless dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AH-dark committed Jan 6, 2024
1 parent 764394d commit 62ef78b
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 653 deletions.
1 change: 0 additions & 1 deletion common/infra/0module.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var tracer = otel.Tracer("github.com/AH-dark/gravatar-with-qq-avatar/internal/in
func Module() fx.Option {
return fx.Module(
"internal.infra",
fx.Provide(NewCacheDriver),
fx.Provide(NewPrometheusRegistry),
fx.Invoke(InvokePrometheusGoCollector),
fx.Provide(NewRedisClient),
Expand Down
10 changes: 0 additions & 10 deletions common/infra/cache.go

This file was deleted.

25 changes: 0 additions & 25 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,6 @@ observability:
type: prometheus
listen: "0.0.0.0:9201"

redis:
mode: standalone
host: redis
port: 6379
username: ""
password: ""

mq:
host: localhost
port: 5672
username: cecilia
password: cecilia
vhost: ""

etcd:
endpoints:
- "http://localhost:2379"
username: ""
password: ""
tls:
ca_file: ""
cert_file: ""
key_file: ""
insecure_skip_verify: false

cassandra:
hosts:
- "localhost:9042"
Expand Down
36 changes: 1 addition & 35 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: gravatar-with-qq-support
name: gravatar-with-qq-avatar

networks:
app-network:
Expand All @@ -10,40 +10,6 @@ volumes:
cassandra-data:

services:
redis:
image: redis:7
ports:
- 6379:6379
networks:
- app-network
volumes:
- redis-data:/data

etcd:
image: quay.io/coreos/etcd:v3.5.9-arm64
entrypoint: /usr/local/bin/etcd
command:
- --name=etcd
- --data-dir=/etcd_data
- --initial-advertise-peer-urls=http://etcd:2380
- --listen-peer-urls=http://0.0.0.0:2380
- --listen-client-urls=http://0.0.0.0:2379
- --advertise-client-urls=http://etcd:2379
- --initial-cluster-token=etcd-cluster-1
- --initial-cluster=etcd=http://etcd:2380
- --initial-cluster-state=new
- --heartbeat-interval=250
- --election-timeout=1250
- --experimental-enable-distributed-tracing=true
- --experimental-distributed-tracing-address='jaeger:4317'
ports:
- "2379:2379"
- "2380:2380"
networks:
- app-network
volumes:
- etcd-data:/etcd_data

jaeger:
image: jaegertracing/all-in-one:latest
ports:
Expand Down
4 changes: 2 additions & 2 deletions docker/application/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ WORKDIR /app
RUN apk add --no-cache ca-certificates libwebp libwebp-tools

# Copy the binary from the build stage
COPY --from=builder /go/src/app/bin/${COMPONENT} ./application
COPY --from=builder /go/src/app/bin/${COMPONENT} /app/application

# Run the binary
ENTRYPOINT ["./application"]
ENTRYPOINT /app/application
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ require (
github.com/hertz-contrib/obs-opentelemetry/tracing v0.3.1
github.com/imroc/req/v3 v3.42.3
github.com/kolesa-team/go-webp v1.0.4
github.com/libi/dcron v0.5.4-0.20240105033402-68982ebda50e
github.com/minio/md5-simd v1.1.2
github.com/minio/sha256-simd v1.0.1
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
Expand All @@ -31,7 +30,6 @@ require (
go.opentelemetry.io/otel/exporters/prometheus v0.44.0
go.opentelemetry.io/otel/sdk v1.21.0
go.opentelemetry.io/otel/sdk/metric v1.21.0
go.opentelemetry.io/otel/trace v1.21.0
go.uber.org/fx v1.20.1
go.uber.org/zap v1.26.0
)
Expand Down Expand Up @@ -95,6 +93,7 @@ require (
github.com/uptrace/opentelemetry-go-extra/otelutil v0.2.3 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/dig v1.17.1 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/libi/dcron v0.5.4-0.20240105033402-68982ebda50e h1:eCPCFvnQfLfVyxHFjzHq++6AqWyODt+DyLtBnRxNwj0=
github.com/libi/dcron v0.5.4-0.20240105033402-68982ebda50e/go.mod h1:8LNNhedFzTl/xoKFgsASCx/TsmmU/XbsJ+f+yx0C3NY=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
Expand Down
44 changes: 0 additions & 44 deletions pkg/cache/driver.go

This file was deleted.

Loading

0 comments on commit 62ef78b

Please sign in to comment.