Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor layout #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Refactor layout #16
Changes from all commits
a0994e21c8285b04958a85824e9dc2d89530b84e095c365e5f481782e16bba88ece31aad7a7b1f429653fba2a5a2855ac66d7e8846c630ac48e9a06File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
# CI/CD ## Description Continuous Integration/Continuous Deployment (CI/CD) is a development practice that automates the process of code integration, testing, and application deployment. It enables frequent and reliable software deliveries. ## Why we use it - Early detection of bugs and conflicts - Automated and consistent deployment - Reduction of manual errors - Fast feedback for developers - Improved code quality ## Tools we use - **GitHub Actions**: For CI/CD integrated with GitHub - **Coolify**: For self-hosted deployment - **Docker**: For containerization and consistent environments ## Pipeline típico ### 1. Continuous Integration - Build automático do código - Execução de testes automatizados - Análise de qualidade (linting, cobertura) - Verificação de segurança ### 2. Continuous Deployment - Deploy automático para staging - Testes de integração - Deploy para produção - Monitoramento e rollback ## Exemplo de workflow ```yaml name: CI/CD Pipeline on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Run tests run: npm test deploy-staging: needs: test if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Deploy to staging run: # comandos de deploy deploy-production: needs: deploy-staging if: github.ref == 'refs/heads/main' && github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Deploy to production run: # deploy commands ``` ## Best practices - Keep pipelines fast (< 10 minutes) - Use cache for dependencies - Implement parallel testing - Configure failure notifications - Document rollback processes ## Resources - [CI/CD Guide](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions) - [CI/CD Practices](https://martinfowler.com/articles/continuousIntegration.html)
CI/CD
Purpose
CI/CD (Continuous Integration and Continuous Delivery/Deployment) automates building, testing and delivering software. A robust CI/CD pipeline reduces manual errors, speeds feedback and makes releases predictable.
Pipeline patterns & stages
Important stages
Advanced pipeline examples
GitHub Actions: build, cache and multi-arch image push
Build & deploy with smoke test gate
Best practices
Failure handling & rollbacks
cleanupjob to revert or remove temp resources.Resources
# Convex ## Description Convex is a backend-as-a-service platform that allows building reactive applications with real-time data synchronization. It provides an integrated database, authentication, and APIs for rapid full-stack application development. ## Why we use it - Automatic data synchronization between client and server - Rapid development without managing infrastructure - Native support for React and other frameworks - Automatic scalability ## Projects that use it - (To be defined - projects that use Convex) ## How to use ### Installation ```bash npm install convex ``` ### Basic configuration ```javascript import { ConvexProvider } from "convex/react"; import { ConvexReactClient } from "convex/client"; const convex = new ConvexReactClient(process.env.CONVEX_URL); function App() { return ( {/* Your app */} ); } ``` ## Resources - [Official Documentation](https://docs.convex.dev) - [Convex Dashboard](https://dashboard.convex.dev)
Convex
What Convex is
Convex is a backend-as-a-service that provides a realtime-enabled database, server-side functions, and client SDKs that simplify building collaborative and realtime applications. It abstracts operational concerns so teams can focus on application logic.
Why use Convex
Advanced commands & local development
The Convex CLI and local dev server are the primary tools during development. Typical commands (verify against your Convex version):
Tips for local dev:
Data modeling and indexing best practices
Functions, performance and reliability
Security and access control
Testing strategies
Integration in CI/CD
convex deployinto your CI pipeline for staging builds; protect production deploys behind approvals.Migration & vendor lock-in considerations
Resources
# Coolify ## Description Coolify is a self-hosted deployment platform that allows deploying web applications, databases, and services on your own servers. It supports multiple languages and frameworks, offering a user-friendly interface for infrastructure management. ## Why we use it - Full control over infrastructure - Automated application deployment - Support for multiple technology stacks - Intuitive web interface for management - Open-source alternative to Heroku/Vercel ## Projects that use it - (Projects that deploy via Coolify) ## How to use ### Installation Coolify can be installed on an Ubuntu/Debian server: ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` ### Basic deployment 1. Connect your Git repository 2. Configure environment variables 3. Choose application type (Node.js, PHP, etc.) 4. Enable automatic deployment ## Resources - [Official Documentation](https://coolify.io/docs) - [GitHub Repository](https://github.com/coollabsio/coolify)
Coolify
What Coolify is
Coolify is an open-source, self-hosted PaaS that lets teams deploy web apps, databases, and services to servers you control. It supports Docker deployments, buildpacks and integrates with Git for push-to-deploy workflows.
Advanced usage and best practices
Installation & production hardening
CI/CD & Git integration
latestimages.Secrets, environment and scaling
Backups and disaster recovery
Monitoring and troubleshooting
Automation (API & Webhooks)
Example: trigger deploy via webhook
Troubleshooting tips
Resources
# Docker Compose ## Description Docker Compose is a tool for defining and running multi-container Docker applications. It allows you to describe a complete application (services, networks, volumes) in a YAML file and manage it with simple commands. ## Why we use it - Orchestration of multiple containers - Consistent local development - Simplifies complex environment setup - Version control for infrastructure configurations ## Projects that use it - (Projects that use Docker Compose for development/local) ## How to use ### Basic docker-compose.yml file ```yaml version: '3.8' services: app: build: . ports: - "3000:3000" environment: - NODE_ENV=development volumes: - .:/app - /app/node_modules db: image: postgres:13 environment: POSTGRES_PASSWORD: password volumes: - postgres_data:/var/lib/postgresql/data volumes: postgres_data: ``` ### Common commands ```bash # Start services docker-compose up # Start in background docker-compose up -d # Stop services docker-compose down # View logs docker-compose logs # Rebuild and start docker-compose up --build ``` ## Resources - [Official Documentation](https://docs.docker.com/compose/) - [Quick Start Guide](https://docs.docker.com/compose/gettingstarted/)
Docker Compose
Overview
Docker Compose (v2 integrated as
docker compose) is a convenient tool for defining and running multi-container environments for development, testing and light-weight staging. For production-grade orchestration prefer Kubernetes or a managed platform, but Compose remains excellent for reproducible local environments and CI integration.Advanced commands & patterns
Prefer the v2 unified CLI where possible: use
docker compose(space) instead of the legacydocker-composebinary.Profiles, override files and env separation
docker-compose.ymlfor canonical config anddocker-compose.override.ymlordocker-compose.dev.ymlfor local overrides. Start with-fto combine files:docker compose -f docker-compose.yml -f docker-compose.dev.yml up.profiles:to enable optional services (e.g.,profiles: [ci]) and run withdocker compose --profile ci up..envandenv_file:to separate secrets from repository (never commit production secrets).Healthchecks and service dependencies
healthcheck:and use orchestration logic in the application instead of relying solely ondepends_on(which only manages startup order).Example healthcheck:
Buildx and multi-platform builds in CI
Use Docker Buildx in CI to build and push multi-arch images and share build cache between runs.
Cache usage example (CI):
Compose in CI pipelines
docker compose down --volumesin a final/cleanup step.COMPOSE_PROJECT_NAME).docker compose run --rm+ explicit wait-for strategies (healthchecks orwait-for-itscripts).Troubleshooting & maintenance
docker system prune -afanddocker volume prune -f(beware data loss).docker inspect <container>anddocker compose ps.Best practices summary
docker compose(v2) across local and CI to keep behavior consistent.Resources
# GitHub Actions ## Description GitHub Actions is a CI/CD platform integrated with GitHub that allows automating development workflows, including build, test, deploy, and other automated tasks. ## Why we use it - Native integration with GitHub repositories - Event-based workflows (push, PR, releases) - Large ecosystem of pre-built actions - Free execution for open source projects - Version control for workflows ## Projects that use it - MonaDocs (this project uses GitHub Actions for CI) ## How to use ### Basic workflow (.github/workflows/ci.yml) ```yaml name: CI on: push: branches: [ main, dev ] pull_request: branches: [ main, dev ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'yarn' - name: Install dependencies run: yarn install --frozen-lockfile - name: Run tests run: yarn test - name: Build run: yarn build ``` ### Common actions - `actions/checkout@v4` - Code checkout - `actions/setup-node@v4` - Node.js setup - `actions/upload-artifact@v4` - Artifact upload - `actions/deploy-pages@v4` - Deploy to GitHub Pages ## Resources - [Official Documentation](https://docs.github.com/en/actions) - [Actions Marketplace](https://github.com/marketplace?type=actions)
GitHub Actions
What GitHub Actions provides
GitHub Actions is the native CI/CD platform for GitHub that enables automating workflows across the software lifecycle: CI, CD, code scanning, release automation and more.
Advanced recipes and best practices
Matrix builds and concurrency
Use matrix builds to test multiple runtime combinations and
concurrencyto avoid duplicated work:Caching dependencies (example: npm/yarn)
Buildx and multi-platform container builds
Use Docker Buildx on runners to build and push multi-arch images:
OIDC for cloud authentication (example: AWS)
Use OIDC to avoid long-lived cloud credentials in secrets. Example for AWS:
Reusable workflows
Export common CI pipelines as reusable workflows and call them from repos to keep DRY.
Security & secrets
permissionsforGITHUB_TOKENand grant least privilege.${{ secrets.NAME }}only in steps that don't print them.Artifacts and test reporting
actions/upload-artifactto store test results, coverage and build artifacts for later inspection.actions/cacheto speed up repeated jobs but ensure keys are invalidated when lockfiles change.Debugging and troubleshooting
ACTIONS_STEP_DEBUGandACTIONS_RUNNER_DEBUGfor deeper logs when investigating a runner issue.outputsbetween steps to pass computed values safely.Resources
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.