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
{ | |
"$schema": "https://biomejs.dev/schemas/2.0.0-beta.1/schema.json", | |
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false }, | |
"files": { | |
"ignoreUnknown": false, | |
"includes": ["**", "!**/node_modules", "!**/.angular", "!**/dist"] | |
}, | |
"formatter": { | |
"enabled": true, | |
"formatWithErrors": false, |
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
# Etapa de construcción | |
FROM python:3.10-slim as builder | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
libpq-dev \ | |
gcc \ | |
python3-dev \ | |
libc-dev \ | |
linux-libc-dev \ | |
&& rm -rf /var/lib/apt/lists/* |
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
#!/usr/bin/env bash | |
echo '--- Export --->' | |
uv export --no-hashes --no-dev > requirements.txt | |
echo '--- Format --->' | |
black --color --safe . | |
echo '--- Add --->' | |
git add --all |
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 * as dotenv from 'dotenv'; | |
import { DataSource, DataSourceOptions } from 'typeorm'; | |
dotenv.config(); | |
const isDevelopment = process.env.NODE_ENV !== 'production'; | |
console.log('isDevelopment', isDevelopment); | |
export const dataSourceOptions: DataSourceOptions = { | |
type: 'postgres', | |
host: process.env.POSTGRES_HOST || 'localhost', |
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
"typeorm:check": "NODE_ENV=development typeorm-ts-node-commonjs migration:show -d src/db/data-source.ts", | |
"typeorm:generate": "NODE_ENV=development typeorm-ts-node-commonjs migration:generate -d src/db/data-source.ts migrations/migration", | |
"typeorm:run": "NODE_ENV=development typeorm-ts-node-commonjs migration:run -d src/db/data-source.ts", | |
"typeorm:revert": "NODE_ENV=development typeorm-ts-node-commonjs migration:revert -d src/db/data-source.ts", | |
"typeorm:all": "npm run typeorm:generate && npm run typeorm:run" |
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
[supervisord] | |
nodaemon=true | |
logfile=/dev/stdout | |
logfile_maxbytes=0 | |
[program:django] | |
command=python manage.py runserver 0.0.0.0:8000 | |
directory=/app | |
stdout_logfile=/dev/stdout | |
stdout_logfile_maxbytes=0 |
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
{ | |
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json", | |
"vcs": { | |
"enabled": false, | |
"clientKind": "git", | |
"useIgnoreFile": false | |
}, | |
"files": { | |
"ignoreUnknown": false, | |
"ignore": [".angular", "node_modules"] |
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
AWS_S3_ENDPOINT_URL = f'https://{os.environ.get("BUCKET_NAMESPACE")}.compat.objectstorage.{os.environ.get("BUCKET_REGION")}.oraclecloud.com' | |
STORAGES = { | |
"default": { | |
"BACKEND": "storages.backends.s3.S3Storage", | |
"OPTIONS": { | |
"access_key": os.environ.get('BUCKET_KEY'), | |
"secret_key": os.environ.get('BUCKET_SECRET'), | |
"bucket_name": os.environ.get('BUCKET_NAME'), | |
"region_name": os.environ.get('BUCKET_REGION'), |
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
stages: | |
- build | |
- replace | |
- deploy | |
variables: | |
SERVER: root@<server> | |
FOLDER: /PANEL/WEBSITES/<folder> | |
POSTGRES_DB: <database> | |
POSTGRES_USER: <user> |
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 requests | |
def obtener_latitud_longitud(address): | |
# Construir la URL de la API de OpenStreetMap | |
url = f"https://nominatim.openstreetmap.org/search.php?q={address}&format=jsonv2" | |
# Realizar la solicitud GET a la API de OpenStreetMap | |
response = requests.get(url) | |
# Verificar si la solicitud fue exitosa |
NewerOlder