-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1104 from gofr-dev/release/v1.24.0
Release/v1.24.0
- Loading branch information
Showing
37 changed files
with
6,436 additions
and
131 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
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,15 +1,16 @@ | ||
FROM golang:1.22 | ||
# Build stage | ||
FROM golang:1.22 AS build | ||
|
||
RUN mkdir /src/ | ||
WORKDIR /src/ | ||
WORKDIR /src | ||
COPY . . | ||
RUN go get ./... | ||
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go | ||
RUN go build -ldflags "-linkmode external -extldflags -static" -a -o /app/main main.go | ||
|
||
FROM alpine:latest | ||
# Final stage | ||
FROM alpine:3.14 | ||
RUN apk add --no-cache tzdata ca-certificates | ||
COPY --from=0 /src/main /main | ||
COPY --from=0 /src/configs /configs | ||
COPY --from=build /app/main /main | ||
COPY --from=build /src/configs /configs | ||
EXPOSE 9000 | ||
|
||
CMD ["/main"] |
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
version: '3.8' | ||
|
||
services: | ||
gofr-http-server: | ||
build: | ||
context: ../. | ||
dockerfile: Dockerfile | ||
environment: | ||
- TRACE_EXPORTER=gofr | ||
- TRACER_RATIO=0.1 | ||
- REDIS_HOST=redisdb | ||
- REDIS_PORT=6379 | ||
- DB_HOST=mysqldb | ||
- DB_USER=root | ||
- DB_PASSWORD=password | ||
- DB_NAME=test | ||
- DB_PORT=3306 | ||
- DB_DIALECT=mysql | ||
ports: | ||
- "9000:9000" | ||
- "2121:2121" | ||
depends_on: | ||
- redisdb | ||
- mysqldb | ||
- grafana | ||
- prometheus | ||
networks: | ||
- gofr-network | ||
|
||
redisdb: | ||
image: redis:7.0.5 | ||
ports: | ||
- "2002:6379" | ||
networks: | ||
- gofr-network | ||
|
||
mysqldb: | ||
image: mysql:8.0.30 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: password | ||
MYSQL_DATABASE: test | ||
ports: | ||
- "2001:3306" | ||
networks: | ||
- gofr-network | ||
|
||
grafana: | ||
image: grafana/grafana:latest | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- GF_SECURITY_ADMIN_USER=admin | ||
- GF_SECURITY_ADMIN_PASSWORD=password | ||
volumes: | ||
- ./provisioning:/etc/grafana/provisioning | ||
networks: | ||
- gofr-network | ||
|
||
prometheus: | ||
image: prom/prometheus:latest | ||
ports: | ||
- "9090:9090" | ||
volumes: | ||
- ./prometheus:/etc/prometheus | ||
networks: | ||
- gofr-network | ||
|
||
networks: | ||
gofr-network: |
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,11 @@ | ||
global: | ||
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. | ||
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. | ||
# scrape_timeout is set to the global default (10s). | ||
|
||
scrape_configs: | ||
- job_name: 'prometheus' | ||
scrape_interval: 5s | ||
metrics_path: '/metrics' | ||
static_configs: | ||
- targets: ['host.docker.internal:2121'] |
11 changes: 11 additions & 0 deletions
11
examples/http-server/docker/provisioning/dashboards/dashboards.yaml
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,11 @@ | ||
apiVersion: 1 | ||
|
||
providers: | ||
- name: 'Gofr Dashboard' | ||
orgId: 1 | ||
folder: '' | ||
type: file | ||
disableDeletion: false | ||
updateIntervalSeconds: 10 | ||
options: | ||
path: /etc/grafana/provisioning/dashboards/gofr-dashboard |
Oops, something went wrong.