
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.


After facing challenges in job hunting and going through a rigorous 5-round interview process at Gameloft, I found myself in a professional environment that values work-life balance, documentation, and team bonding. The experience at Gameloft, from the welcoming first day to memorable team trips to Vinh Hy and Cam Ranh, has shown me that a workplace can be more than just about work - it can be a place where lasting relationships are built and professional growth is nurtured.
Beiryu
Contributor

Hey there! Ever heard of Next.js? It's a pretty cool tool for creating single page web apps (SPA) and static web apps (SSG). Built on React, Next.js is packed with handy features that can shave hours off your development time and make your pages load lightning fast. In this piece, we're gonna check out what's new and exciting in the latest version of Next.js. Stay tuned!
Beiryu
Contributor