From 8a354872eb7baab708ac108835e7f14301c92e0b Mon Sep 17 00:00:00 2001 From: Idhibhat Pankam Date: Fri, 12 Jul 2024 23:25:35 +0700 Subject: [PATCH 1/3] remove make qa --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index b42dea0..2ab1d32 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,6 @@ docker: docker rm -v -f $$(docker ps -qa) || echo "No containers found. Skipping removal." docker-compose up -docker-qa: - docker rm -v -f $$(docker ps -qa) || echo "No containers found. Skipping removal." - docker-compose -f docker-compose.qa.yml up - server: go run cmd/main.go From f1964bd376f72c1ed38a429aacb820fc2520414d Mon Sep 17 00:00:00 2001 From: Idhibhat Pankam Date: Fri, 12 Jul 2024 23:31:09 +0700 Subject: [PATCH 2/3] remove microservices folder --- microservices/auth/staff.template.json | 6 ------ microservices/prometheus/prometheus.yml | 9 --------- 2 files changed, 15 deletions(-) delete mode 100644 microservices/auth/staff.template.json delete mode 100644 microservices/prometheus/prometheus.yml diff --git a/microservices/auth/staff.template.json b/microservices/auth/staff.template.json deleted file mode 100644 index 2d355e8..0000000 --- a/microservices/auth/staff.template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "staffs": [ - "6932203021", - "6932203121" - ] -} \ No newline at end of file diff --git a/microservices/prometheus/prometheus.yml b/microservices/prometheus/prometheus.yml deleted file mode 100644 index 3d752c6..0000000 --- a/microservices/prometheus/prometheus.yml +++ /dev/null @@ -1,9 +0,0 @@ -global: - scrape_interval: 15s - evaluation_interval: 15s - -scrape_configs: - - job_name: gateway-api - static_configs: - - targets: ['gateway:3001'] - metrics_path: '/api/v1/metrics' \ No newline at end of file From d053f97bd14dace8717161db5e4032ddf83e3361 Mon Sep 17 00:00:00 2001 From: Idhibhat Pankam Date: Sat, 13 Jul 2024 13:43:25 +0700 Subject: [PATCH 3/3] remove APP_MAX_FILE_SIZE_MB --- .env.template | 1 - config/config.go | 15 ++++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.env.template b/.env.template index 9b666aa..bef11d7 100644 --- a/.env.template +++ b/.env.template @@ -1,6 +1,5 @@ APP_PORT=3005 APP_ENV=development -APP_MAX_FILE_SIZE_MB= STORE_ENDPOINT= STORE_ACCESS_KEY= diff --git a/config/config.go b/config/config.go index 1da0599..ef5a7d8 100644 --- a/config/config.go +++ b/config/config.go @@ -2,15 +2,13 @@ package config import ( "os" - "strconv" "github.com/joho/godotenv" ) type App struct { - Port string - Env string - MaxFileSize int64 + Port string + Env string } type DB struct { @@ -40,14 +38,9 @@ func LoadConfig() (config *Config, err error) { } } - maxFileSizeMB, err := strconv.ParseInt(os.Getenv("APP_MAX_FILE_SIZE_MB"), 10, 64) - if err != nil { - return nil, err - } appConfig := App{ - Port: os.Getenv("APP_PORT"), - Env: os.Getenv("APP_ENV"), - MaxFileSize: maxFileSizeMB, + Port: os.Getenv("APP_PORT"), + Env: os.Getenv("APP_ENV"), } storeConfig := Store{