Skip to content
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

Dev #47

Merged
merged 57 commits into from
Aug 27, 2024
Merged

Dev #47

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7fecccc
Changing lot of stuff :c
edmdz Apr 23, 2024
73c51e8
more changes
edmdz Apr 23, 2024
196dd25
memonized ImageUpload
edmdz Apr 23, 2024
131fc88
adding changes
edmdz Apr 27, 2024
cc35a63
Merge pull request #41 from BananasDev0/RD-92
edmdz Apr 27, 2024
7bf86b6
refactored ProductTypeTabs
edmdz Apr 27, 2024
d817f62
refactored ProductSelector
edmdz Apr 27, 2024
dfbe5ed
Refactored to carModel
edmdz Apr 28, 2024
f8d81c8
refactored product list view
edmdz Apr 28, 2024
4e898a1
refactored productBasicInfo
edmdz Apr 28, 2024
d88a6ba
refactored models
edmdz Apr 29, 2024
59e6bc4
refactored model manager
edmdz Apr 29, 2024
e034f75
refactored price manager
edmdz Apr 29, 2024
1a171c4
refactored product summary
edmdz Apr 30, 2024
f7d7b12
refactored create product
edmdz Apr 30, 2024
2ee6be6
completed product viewer
edmdz May 2, 2024
f0f0e02
removing console logs
edmdz May 2, 2024
1916a63
fixed errors
edmdz May 2, 2024
c507d43
Merge pull request #43 from BananasDev0/RD-REFACTOR
edmdz May 2, 2024
172936a
modifying workflow
edmdz May 23, 2024
4b056cd
Merge pull request #44 from BananasDev0/RD-REFACTOR
edmdz May 23, 2024
5ea4b2a
add
edmdz May 23, 2024
915a22c
adding image visor
edmdz Jun 21, 2024
d97a37f
adding support to delete models
edmdz Jun 21, 2024
78e1568
adding support to delete products
edmdz Jun 21, 2024
c908e48
added product update consumption
edmdz Jun 22, 2024
d7c8f92
refactored sidebar menu
edmdz Jul 14, 2024
e2854e1
displaying user info
edmdz Jul 14, 2024
27dbf71
removing reset on product dialog close
edmdz Jul 16, 2024
b81cc2c
overrided history api behavior in app
edmdz Jul 16, 2024
da16efc
chore: Update ProductDialogContext and ProviderProduct constructor
edmdz Jul 23, 2024
4a51356
chore: Add repopack.config.json for custom file packing configuration
edmdz Jul 23, 2024
ef0b712
updating gitignore
edmdz Jul 23, 2024
1e3b978
adding productstypeselector page
edmdz Jul 24, 2024
cde15e1
merging functionality
edmdz Jul 24, 2024
ac76377
chore: Override history API behavior in app
edmdz Jul 24, 2024
29f8ddf
chore: Update NavigationManager and BrandContainer components
edmdz Jul 24, 2024
939f756
chore: Update BrandContainer to pass navigate prop to ListContainer
edmdz Jul 24, 2024
5133fa8
Merge pull request #45 from BananasDev0/UX-REDESIGN
edmdz Jul 24, 2024
b47f3e6
chore: Update Vite config for asset file names and asset inclusion
edmdz Jul 24, 2024
e0a4a47
feat: Add images for product types in ProductTypeSelector
edmdz Jul 24, 2024
f51981f
feat: Add console log for searchOption in CustomSearchBar
edmdz Jul 31, 2024
bb2b373
chore: Update BrandContainer and NavigationManager components
edmdz Aug 1, 2024
ce7d86a
chore: Update search option based on screen in ProductsContext
edmdz Aug 2, 2024
9762e7a
chore: Refactor NavigationManager to improve navigation logic
edmdz Aug 2, 2024
56b80f6
new navigation
edmdz Aug 3, 2024
3b8b680
chore: Update ProductCard and ProductTypeSelector components with pro…
edmdz Aug 3, 2024
cb6fbfa
Refactored completed
edmdz Aug 4, 2024
a74cb9c
chore: Update NavigationBar component to use MuiBreadcrumbs and fix i…
edmdz Aug 4, 2024
f53d6a7
Merge pull request #46 from BananasDev0/navigation-refactor
edmdz Aug 4, 2024
933d82d
chore: Update CarModelContainer to fetch car models by brand ID and s…
edmdz Aug 5, 2024
0a60acc
feat: Add function to get base64 image dimensions
edmdz Aug 6, 2024
5b3f916
placeholder when empty data
edmdz Aug 6, 2024
3f33439
fixing issue with providers
edmdz Aug 6, 2024
28e2f40
added num series field in provider manager
edmdz Aug 6, 2024
95499e1
feat: Add user menu with option to add new user
edmdz Aug 14, 2024
36fbacb
adding docker support
edmdz Aug 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 30 additions & 27 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
name: DEV Despliegue en EC2
name: Build and Deploy

on:
push:
branches:
- dev # Cambia 'dev' por la rama que desees
- dev # Cambia esto a la rama que deseas monitorear

jobs:
deploy:
build-and-deploy:
runs-on: ubuntu-latest
environment: DEV

steps:
- name: Checkout código
uses: actions/checkout@v4

- name: Copiar archivos al servidor
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEV_EC2_HOST }}
username: ${{ secrets.DEV_EC2_USER }}
key: ${{ secrets.DEV_SSH_PRIVATE_KEY }}
port: 22
source: "."
target: "projects/RefaDiazFrontEnd"

- name: Ejecutar comandos remotos
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEV_EC2_HOST }}
username: ${{ secrets.DEV_EC2_USER }}
key: ${{ secrets.DEV_SSH_PRIVATE_KEY }}
port: 22
script: |
cd projects/RefaDiazFrontEnd
npm install
pm2 restart RefaDiazApp
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16' # Asegúrate de que esta versión es compatible con tu proyecto

- name: Install dependencies
run: npm install

- name: Set environment variables
run: echo "${{ secrets.ENV_CONFIG }}" > .env.development

- name: Build the application
run: npm run build -- --mode development

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2 # Cambia esto a tu región de AWS

- name: Deploy to S3
run: aws s3 sync ./dist s3://refadiazapp --delete
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ dist-ssr
*.sln
*.sw?
.env*
repopack-refadiazfrontend-output.txt
18 changes: 18 additions & 0 deletions docker-composer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3.8'

services:
api:
build:
context: ./api
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production

web:
build:
context: ./web
dockerfile: Dockerfile
ports:
- "80:80"
38 changes: 38 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Build stage
FROM node:18-alpine AS build

WORKDIR /app

# Copy package.json and package-lock.json first to leverage Docker cache
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy remaining files
COPY . .

# Build the project
RUN npm run build

# Verify that the dist directory exists and contains files
RUN ls -la /app/dist

# Production stage
FROM nginx:alpine

# Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*

# Copy the build output to the Nginx HTML directory
COPY --from=build /app/dist /usr/share/nginx/html

# Expose the default Nginx port
EXPOSE 80

# Add a health check (optional)
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost/ || exit 1

# Start Nginx
CMD ["nginx", "-g", "daemon off;"]
60 changes: 59 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
"firebase": "^10.8.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-photoswipe-gallery": "^3.0.1",
"react-router-dom": "^6.22.1",
"react-transition-group": "^4.4.5"
"react-transition-group": "^4.4.5",
"uuid": "^9.0.1"
},
"devDependencies": {
"@types/react": "^18.2.55",
Expand All @@ -33,5 +35,9 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"vite": "^5.1.0"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.9.5"
}

}
Loading
Loading