Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosferreyra authored Aug 7, 2024
0 parents commit a3d0e62
Show file tree
Hide file tree
Showing 132 changed files with 13,131 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/FrontCi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ForntCI Pipeline

on:
push:
branches:
- main # Es pora que se ejecute en main
pull_request:
branches:
- '**' # Es pora que se ejecute en todas las ramas

jobs:
lint:
name: Linter de Código
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setear Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Instalar dependencias
run: npm install
working-directory: ./FrontAdmin

- name: Correr linter de codigo
run: npm run lint
working-directory: ./FrontAdmin

44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

# Python Envirioment
.venv
/venv
.env
env
/env


# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?


# carpeta obsidian
.obsidian/

# API Docs
#schema.yml
logs/

# sql files
*.sql
1 change: 1 addition & 0 deletions CurrentDefault.code-profile

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Use the official Python image from the Docker Hub
FROM python:3.12-slim-bullseye

# Set environment variables
ENV SECRET_KEY=${DJANGO_SECRET_KEY}
ENV DJANGO_SETTINGS_MODULE=server.settings.base
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Set the working directory
WORKDIR /app

# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt

# Copy the entire backend directory
COPY backend/ .

# Collect static files
RUN python manage.py collectstatic --noinput

# Make migrations and migrate the database
RUN python manage.py makemigrations
RUN python manage.py migrate

# Generate the OpenAPI schema
RUN python manage.py spectacular --color --file schema.yml --validate

# Expose port 8000 for the Django app
EXPOSE 8000

# Run the application
CMD ["gunicorn", "server.wsgi:application", "--bind", "0.0.0.0:8000"]
1 change: 1 addition & 0 deletions FrontAdmin/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=http://djangobackend.us-east-1.elasticbeanstalk.com/api/swagger-ui/
21 changes: 21 additions & 0 deletions FrontAdmin/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
"@typescript-eslint/prefer-as-const": "warn", // Warning de la regla que requiere const en lugar de type assertion
"@typescript-eslint/no-unused-vars": "warn", // Warning de la regla que indica variables no usadas
"no-extra-semi": "warn", // Warning de la regla que prohíbe los puntos y comas innecesarios
},
};
13 changes: 13 additions & 0 deletions FrontAdmin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image" href=".//public/TUP.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TUP</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit a3d0e62

Please sign in to comment.