
This section outlines the branching strategy and the overall CI/CD pipeline. We utilize a Git flow-inspired approach.

CI/CD Pipeline Overview:

This section details the AWS infrastructure and specific requirements for the CI/CD pipeline.

AWS Services:
CI/CD Pipeline Requirements:

This section describes the MongoDB setup.
bash#!/bin/bash## inputDATABASE_CONNECTION_STRING="$1"if [ -z $DATABASE_CONNECTION_STRING ]; thenecho "Require DATABASE_CONNECTION_STRING! exit"exit 1fi## defaultMIGRATE_MONGODB_DIR="./mongodb-migrations"MIGRATE_MONGO_NPM_VERSION="11.0.0"export DATABASE_CONNECTION_STRING="${DATABASE_CONNECTION_STRING}"if [ -d $MIGRATE_MONGODB_DIR ]; then# go to mongodb-migrations directorycd $MIGRATE_MONGODB_DIR# install migrate-mongo npm packagenpm install -g migrate-mongo@${MIGRATE_MONGO_NPM_VERSION}# start migrationmigrate-mongo up# check migration statusif [ $? != 0 ]; thenecho "Migrate mongodb failed!"exit 1fiecho "Migrate mongodb successfully!"migrate-mongo statuselseecho "${MIGRATE_MONGODB_DIR} not found! Skip!"fi
This section outlines the requirements for using Terraform to manage infrastructure.
This section provides a step-by-step guide on deploying services to the ECS cluster.
json"<service_name>": {"service_ports" : [3000], #--> default port for service (keep it by default)"security" : "low", #--> set log retention days, refer README.md in terraform for more details."service_enable_autoscaling" : true, #--> set autoscaling, should be enabled (keep it by default)"service_discovery_dns_record_a_ttl": 60, #--> ttl for private dns records (keep it by default)"task_role_name" : "ecs-execution-role", #--> the task role for ecs service"execution_role_name" : "ecs-execution-role", #--> the service role for ecs service"service_health_check_path" : "/<service_name>/healthcheck", #--> the healthcheck path name of public API endpoint. For example: <leaderboard>: https://api-uat.claynosaurz.com/leaderboard/healthcheck"leaderboard_config_path_pattern" : "/<service_name>/*", #--> the path name of public API endpoint. For example: <leaderboard>: https://api-uat.claynosaurz.com/leaderboard/*"task_container_definitions" : [{"name" : "<service_name>-container", #--> this is name of service container. For example: <leaderboard>: 'leaderboard-container'"image" : "975050041486.dkr.ecr.us-east-1.amazonaws.com/claynosaurz-<env>-<service_name>:<tag_version>", #--> image ECR url. The tag version, you can use 'latest' and update after the image was built and pushed to ECR."environment" : #--> Environments for ecs service. In details, gameloft will share the list env.{"SERVICE_NAME": "leaderboard","ENV": "uat","PORT": "3000","DATABASE_CONNECTION_LIMIT": "100","DEBUG_ENABLE_DATABASE_QUERY_LOG": "1","DEBUG_ENABLE_DATABASE_ERROR_LOG": "1","DEBUG_ENABLE_HTTP_REQUEST_BODY_LOG": "1","DEBUG_ENABLE_HTTP_REQUEST_HEADERS_LOG": "1","DISABLE_PRETTY_LOGGER": "1","DISABLE_HEALTHCHECK_LOG": "1","CORS_ORIGINS": "*","APP_REQUEST_TIMEOUT": "30","PATH_PREFIX": "leaderboard","DEBUG_ENABLE_SWAGGER": "1","REFRESH_TOKEN_EXPIRES_IN": "86400","ACCESS_TOKEN_EXPIRES_IN": "600","ADDITIONAL_LOG_REDACT_KEYS": "*","APM_ENABLE": true,"SENTRY_ENVIRONMENT": "leaderboard.uat"},"secrets" : #--> This is a secrets of services. Similar to environments, gameloft will share it.["DATABASE_CONNECTION_STRING","DATA_TRANSFER_KEY","DATA_TRANSFER_IV","INTERNAL_KEY","SENTRY_DSN","REDIS_CONNECTION_STRING_READ","REDIS_CONNECTION_STRING_WRITE"],"ports" : [3000], #--> port for this container. One service is able to contains multiple containers with different ports."vars" : {"linuxParameters" : { "initProcessEnabled" : true }, #--> keep it by default"private_registry" : false #--> set true if you are using the docker private registry.}}]}
This section describes the CI/CD workflow specifically for the CMS frontend, likely deployed using Vercel.

This section describes the CI/CD workflow for the backend services, deployed to the ECS cluster. This workflow is similar to the general CI/CD pipeline described in 1.23.4.1, but with specifics for backend services.


In the ever-evolving landscape of digital health, the need for a unified platform that consolidates data from various health tracking devices has become paramount. This article provides an in-depth look at how to create a system that seamlessly integrates data from popular platforms such as Garmin, Polar, Apple Watch, Dexcom, Withings, Fitbit, and Spotify.
Beiryu
Contributor

Xin chào các bạn, hôm nay mình sẽ chia sẻ với các bạn về kinh nghiệm xây dựng hệ thống streaming video và cách tích hợp với các dịch vụ của bên thứ ba như Dropbox và Bunny. Qua bài viết này, mình hy vọng sẽ cung cấp cho các bạn một cái nhìn tổng quan về kiến trúc streaming video và những lựa chọn phổ biến khi làm việc với các dịch vụ bên ngoài.
Beiryu
Contributor