This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydantic import BaseSettings | |
class GlobalConfig(BaseSettings): | |
APP_NAME: str = "Mi Aplicación" | |
APP_VERSION: str = "1.0.0" | |
DEBUG: bool = False | |
DATABASE_URL: str | |
class Config: | |
env_prefix = "MYAPP_" # variables de entorno deberán comenzar con este prefijo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from fastapi import FastAPI | |
import datetime | |
import boto3 | |
app = FastAPI() | |
def get_int_timestamp(): | |
return int(datetime.datetime.now().timestamp()) | |
def dev_get_bearer_token(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Nombre del contenedor | |
# aws ecr create-repository --repository-name my-ecr-repo --region us-east-1 | |
nombre_contenedor="foton-epc" | |
# URL del repositorio de ECR | |
url_ecr="265174169506.dkr.ecr.us-east-1.amazonaws.com" | |
# Obtener el token de acceso de ECR y realizar el inicio de sesión en Docker | |
$(aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $url_ecr) |