diff --git a/Makefile b/Makefile index ed9b311..b64e28f 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 diff --git a/docker-compose.qa.template.yml b/docker-compose.qa.template.yml deleted file mode 100644 index 2365899..0000000 --- a/docker-compose.qa.template.yml +++ /dev/null @@ -1,152 +0,0 @@ -version: "3.9" - -services: - gateway: - image: ghcr.io/isd-sgcu/rpkm67-gateway:latest - container_name: gateway - restart: unless-stopped - environment: - APP_PORT: 3001 - APP_ENV: development - APP_MAX_FILE_SIZE_MB: 10 - CORS_ORIGINS: http://localhost:3000 - SERVICE_AUTH: auth:3002 - SERVICE_BACKEND: host.docker.internal:3003 - SERVICE_CHECKIN: checkin:3004 - SERVICE_STORE: store:3005 - networks: - - rpkm67 - ports: - - "3001:3001" - - auth: - image: ghcr.io/isd-sgcu/rpkm67-auth:latest - container_name: auth - restart: unless-stopped - environment: - APP_PORT: 3002 - APP_ENV: development - DB_URL: postgres://root:1234@db:5432/rpkm67_db - REDIS_HOST: localhost - REDIS_PORT: 6379 - REDIS_PASSWORD: 5678 - JWT_SECRET: secret - JWT_ACCESS_TTL: 3600 - JWT_REFRESH_TTL: 259200 - JWT_ISSUER: rpkm67.sgcu.in.th - JWT_RESET_TOKEN_TTL: 900 - OAUTH_CLIENT_ID: client_id - OAUTH_CLIENT_SECRET: client_secret - OAUTH_REDIRECT_URI: http://localhost:3000 - networks: - - rpkm67 - volumes: - - ./microservices/auth:/app/config/staffs - ports: - - "3002:3002" - - # backend: - # image: ghcr.io/isd-sgcu/rpkm67-backend:latest - # container_name: backend - # restart: unless-stopped - # environment: - # APP_PORT: 3003 - # APP_ENV: development - # DB_URL: postgres://root:1234@db:5432/rpkm67_db - # REDIS_HOST: cache - # REDIS_PORT: 6379 - # REDIS_PASSWORD: 5678 - # PIN_WORKSHOP_CODE: workshop - # PIN_WORKSHOP_COUNT: 5 - # PIN_LANDMARK_CODE: landmark - # PIN_LANDMARK_COUNT: 4 - # networks: - # - rpkm67 - # ports: - # - "3003:3003" - - checkin: - image: ghcr.io/isd-sgcu/rpkm67-checkin:latest - container_name: checkin - restart: unless-stopped - environment: - APP_PORT: 3004 - APP_ENV: development - DB_URL: postgres://root:1234@db:5432/rpkm67_db - networks: - - rpkm67 - ports: - - "3004:3004" - - store: - image: ghcr.io/isd-sgcu/rpkm67-store:latest - container_name: store - restart: unless-stopped - environment: - APP_PORT: 3005 - APP_ENV: development - APP_MAX_FILE_SIZE_MB: 20 - STORE_ENDPOINT: endpoint - STORE_ACCESS_KEY: access_key - STORE_SECRET_KEY: secret_key - STORE_USE_SSL: true - STORE_BUCKET_NAME: rpkm67-local - networks: - - rpkm67 - ports: - - "3005:3005" - - db: - image: postgres:15.1-alpine3.17 - container_name: db - restart: unless-stopped - environment: - POSTGRES_USER: root - POSTGRES_PASSWORD: "1234" - POSTGRES_DB: rpkm67_db - networks: - - rpkm67 - volumes: - - ./volumes/postgres:/var/lib/postgresql/data - ports: - - "5432:5432" - - cache: - image: redis:7.2.3-alpine - container_name: cache - restart: unless-stopped - environment: - REDIS_HOST: localhost - REDIS_PASSWORD: "5678" - networks: - - rpkm67 - ports: - - "6379:6379" - - prometheus: - image: prom/prometheus:latest - container_name: prometheus - restart: unless-stopped - networks: - - rpkm67 - volumes: - - ./microservices/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - ports: - - "9090:9090" - - grafana: - image: grafana/grafana:latest - container_name: grafana - restart: unless-stopped - environment: - - GF_SECURITY_ADMIN_PASSWORD=1234 - networks: - - rpkm67 - volumes: - - ./volumes/grafana:/var/lib/grafana - ports: - - "3006:3000" - -networks: - rpkm67: - name: rpkm67 diff --git a/go.mod b/go.mod index f283829..d7703b5 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 github.com/isd-sgcu/rpkm67-go-proto v0.4.8 - github.com/isd-sgcu/rpkm67-model v0.0.7 + github.com/isd-sgcu/rpkm67-model v0.1.0 github.com/joho/godotenv v1.5.1 github.com/redis/go-redis/v9 v9.5.3 github.com/stretchr/testify v1.9.0 diff --git a/go.sum b/go.sum index 15e8047..19085d1 100644 --- a/go.sum +++ b/go.sum @@ -25,6 +25,8 @@ github.com/isd-sgcu/rpkm67-model v0.0.6 h1:pYlqOmeXGQIfHdOhyAta4kXkqnoLc4X3KWcAj github.com/isd-sgcu/rpkm67-model v0.0.6/go.mod h1:dxgLSkrFpbQOXsrzqgepZoEOyZUIG2LBGtm5gsuBbVc= github.com/isd-sgcu/rpkm67-model v0.0.7 h1:3b8gf1Ocg+Ky4xocKtCqVCB3rFDg90IgEXRwNmHt0OE= github.com/isd-sgcu/rpkm67-model v0.0.7/go.mod h1:dxgLSkrFpbQOXsrzqgepZoEOyZUIG2LBGtm5gsuBbVc= +github.com/isd-sgcu/rpkm67-model v0.1.0 h1:ML4C8cU7L8m53QuAiIkrykzQP9VYlsOWGrQO53gxSLc= +github.com/isd-sgcu/rpkm67-model v0.1.0/go.mod h1:dxgLSkrFpbQOXsrzqgepZoEOyZUIG2LBGtm5gsuBbVc= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= 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