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
--- | |
version: "2" | |
services: | |
adguardhome: | |
image: adguard/adguardhome:latest | |
container_name: adguardhome | |
ports: | |
- 53:53/tcp | |
- 53:53/udp | |
- 67:67/udp |
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
package com.example.prometheuspushgateway; | |
import io.micrometer.core.annotation.Timed; | |
import io.micrometer.core.instrument.Counter; | |
import io.micrometer.core.instrument.MeterRegistry; | |
import org.springframework.stereotype.Service; | |
@Service | |
public class HelloService { |
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
# my global config | |
global: | |
scrape_interval: 15s # By default, scrape targets every 15 seconds. | |
evaluation_interval: 15s # By default, scrape targets every 15 seconds. | |
scrape_configs: | |
- job_name: 'prometheus' | |
scrape_interval: 5s | |
static_configs: | |
- targets: ['localhost:9090'] |
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
version: '3' | |
networks: | |
monitor-net: | |
driver: bridge | |
volumes: | |
prometheus_data: {} | |
pushgateway_data: {} | |
services: | |
prometheus: |
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
service: secrets-demo | |
runtime: java11 | |
instance_class: F2 | |
env_variables: | |
SPRING_PROFILES_ACTIVE: "prod" | |
GCP_SECRETS_ENABLED: true |
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
package com.rameshl.demo.secretmanager; | |
import com.rameshl.demo.secretmanager.config.AppSecrets; | |
import lombok.RequiredArgsConstructor; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
@RequiredArgsConstructor | |
public class HelloController { |
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
package com.rameshl.demo.secretmanager.config; | |
import lombok.Data; | |
import lombok.Getter; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.stereotype.Component; | |
@Data | |
@Component | |
@ConfigurationProperties(prefix = "app.secrets") |
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
spring: | |
profiles: | |
active: prod | |
app: | |
secrets: | |
googleClientId: ${gcp-secrets.google_client_id} | |
googleClientSecret: ${gcp-secrets.google_client_secret} |
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
spring: | |
cloud: | |
gcp: | |
secretmanager: | |
enabled: ${GCP_SECRETS_ENABLED:false} | |
bootstrap: | |
enabled: ${GCP_SECRETS_ENABLED:false} | |
secret-name-prefix: gcp-secrets. |
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
# Pass the following environment variables while calling the command \ | |
GCP_PROJECT - the gcp project name \ | |
SERVICE_NAME - the name of the service to be deployed | |
# build | |
.PHONY: build | |
build: | |
@echo "🍳 Building docker image using Cloud build" | |
gcloud builds submit --tag gcr.io/$(GCP_PROJECT)/$(SERVICE_NAME):0.1 --project $(GCP_PROJECT) |
NewerOlder