-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #26
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
Merged
Develop #26
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
f8a7268
Refactors and responsive in login module
DanilsGit c62035f
Merge pull request #1 from Parchat/refactors-and-responsive
DanilsGit 26b6b91
Update and rename main.yml to master-CD.yml
DanilsGit 39fdffa
Merge pull request #2 from Parchat/DanilsGit-patch-1
DanilsGit 4907161
Create develop-CD.yml
DanilsGit 6eb146c
Merge pull request #3 from Parchat/DanilsGit-patch-2
DanilsGit 950bf0d
Update develop-CD.yml
DanilsGit 3665585
Merge pull request #4 from Parchat/DanilsGit-patch-3
DanilsGit 8c5d987
Update develop-CD.yml
DanilsGit 724a6c1
Merge pull request #5 from Parchat/DanilsGit-patch-4
DanilsGit d60556c
Update master-CD.yml
DanilsGit 848af72
Merge pull request #6 from Parchat/DanilsGit-patch-5
DanilsGit 3431125
Create dashboard route and minimal view
DanilsGit c041d3d
Merge pull request #7 from Parchat/user-profile
DanilsGit 649faae
Remove timeout
DanilsGit 91a45d3
Merge pull request #8 from Parchat/user-profile
DanilsGit 1ad6efd
Update master-CD
DanilsGit 1d762ff
Merge pull request #9 from Parchat/user-profile
DanilsGit dc9953b
add Link hrefs
DanilsGit d8d2b73
Merge pull request #10 from Parchat/user-profile
DanilsGit d664c80
Update develop-CD
DanilsGit c8eb0f2
Merge pull request #11 from Parchat/user-profile
DanilsGit 12a98dc
Fix reload in VM
DanilsGit c7b0486
Merge pull request #12 from Parchat/user-profile
DanilsGit 21fa1e9
Create rooms view
DanilsGit 33d0fb2
Merge pull request #13 from Parchat/user-profile
DanilsGit 956934c
testing ssh
DanilsGit d7ea83b
Merge pull request #14 from Parchat/user-profile
DanilsGit 28c71a5
Update CD
DanilsGit 5f3c267
Merge pull request #15 from Parchat/user-profile
DanilsGit d7a4933
Create rooms view with a basic suspense integration
DanilsGit 688d1b4
Analyzing behavior of multiple messages
DanilsGit 17869f7
Merge pull request #16 from Parchat/user-profile
DanilsGit f419acf
Fix overflow and mobile styles ni room view
DanilsGit 9fa8ebb
Merge pull request #17 from Parchat/user-profile
DanilsGit b030fbc
Migrate to docker
DanilsGit c2e6e65
Improve cache in docker build
DanilsGit 377ff5d
Merge pull request #18 from Parchat/user-profile
DanilsGit b7bec28
improving input in chat
DanilsGit 07ada6c
Improve deployment with docker images
DanilsGit 3a332ff
Merge pull request #19 from Parchat/user-profile
DanilsGit c5fcee7
Improve deployment with docker images
DanilsGit 4922c6c
Merge pull request #20 from Parchat/user-profile
DanilsGit 83bca27
Rename Dockerfile.dev to dockerfile.dev
DanilsGit e395774
Merge pull request #22 from Parchat/DanilsGit-patch-1
DanilsGit 7c3d869
fix timeout
DanilsGit ac98e89
Merge pull request #23 from Parchat/user-profile
DanilsGit 0c5f841
fix build
DanilsGit e64ca90
Merge pull request #24 from Parchat/user-profile
DanilsGit bc2cae7
Implementing version control in dockerhub
DanilsGit 8f9ed5e
Merge pull request #25 from Parchat/user-profile
DanilsGit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Ignorar dependencias locales | ||
| # node_modules se utilizará para mandarse desde github actions | ||
|
|
||
| # Ignorar config de Git | ||
| .git | ||
| .gitignore | ||
|
|
||
| # Archivos temporales o de sistema | ||
| .DS_Store | ||
| *.log | ||
|
|
||
| # Archivos de desarrollo | ||
| .vscode | ||
| .idea | ||
|
|
||
| # Otros archivos que no deben ir al contenedor | ||
| .env | ||
| *.env.local | ||
| tests | ||
| coverage | ||
| README.md |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Deploy Frontend-Develop to GCP VM | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: [develop] | ||
|
|
||
| jobs: | ||
| deploy: | ||
| if: github.event.pull_request.merged == true | ||
| name: 🚀🛠 Deploy DEVELOP Next.js to GCP | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: develop | ||
|
|
||
| # 👉 Build la imagen Docker | ||
| - name: Build Docker image | ||
| run: docker build -f Dockerfile.prod -t ${{ secrets.DOCKER_USERNAME }}/frontend-dev:stage-${{ github.sha }} . | ||
|
|
||
| # 👉 Log in to DockerHub | ||
| - name: DockerHub Login | ||
| run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
|
|
||
| # 👉 Push la imagen | ||
| - name: Push Docker image to DockerHub | ||
| run: docker push ${{ secrets.DOCKER_USERNAME }}/frontend-dev:stage-${{ github.sha }} | ||
|
|
||
| # 👉 Add VM to known_hosts | ||
| - name: Add VM to known_hosts | ||
| run: | | ||
| mkdir -p ~/.ssh | ||
| ssh-keyscan ${{ secrets.GCP_VM_IP }} >> ~/.ssh/known_hosts | ||
|
|
||
| # 👉 Desplegar en la VM | ||
| - name: Deploy on GCP VM | ||
| uses: appleboy/ssh-action@v0.1.4 | ||
| with: | ||
| host: ${{ secrets.GCP_VM_IP }} | ||
| username: ${{ secrets.GCP_VM_USER }} | ||
| key: ${{ secrets.GCP_SSH_KEY }} | ||
| script: | | ||
| cd /home/proyectosdanils/ | ||
| docker compose down frontend-dev | ||
| docker pull ${{ secrets.DOCKER_USERNAME }}/frontend-dev:stage-${{ github.sha }} | ||
| export DOCKER_IMAGE_FRONTEND_DEV=${{ secrets.DOCKER_USERNAME }}/frontend-dev:stage-${{ github.sha }} | ||
| docker compose up -d frontend-dev |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: Deploy Frontend to GCP VM | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| types: [closed] # (mergeado) | ||
| branches: [master] | ||
|
|
||
| jobs: | ||
| deploy: | ||
| if: github.event.pull_request.merged == true # Solo si se hizo merge | ||
| name: 🚀 PRODUCTION Deploy Next.js to GCP | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # 👉 Build la imagen Docker | ||
| - name: Build Docker image | ||
| run: docker build -f Dockerfile.prod -t ${{ secrets.DOCKER_USERNAME }}/frontend-prod:${{ github.sha }} . | ||
|
|
||
| # 👉 Log in to DockerHub | ||
| - name: DockerHub Login | ||
| run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
|
|
||
| # 👉 Push la imagen | ||
| - name: Push Docker image to DockerHub | ||
| run: docker push ${{ secrets.DOCKER_USERNAME }}/frontend-prod:${{ github.sha }} | ||
|
|
||
| # 👉 Add VM to known_hosts | ||
| - name: Add VM to known_hosts | ||
| run: | | ||
| mkdir -p ~/.ssh | ||
| ssh-keyscan ${{ secrets.GCP_VM_IP }} >> ~/.ssh/known_hosts | ||
|
|
||
| # 👉 Desplegar en la VM | ||
| - name: Deploy on GCP VM | ||
| uses: appleboy/ssh-action@v0.1.4 | ||
| with: | ||
| host: ${{ secrets.GCP_VM_IP }} | ||
| username: ${{ secrets.GCP_VM_USER }} | ||
| key: ${{ secrets.GCP_SSH_KEY }} | ||
| script: | | ||
| cd /home/proyectosdanils/ | ||
| docker compose down frontend-prod | ||
| docker pull ${{ secrets.DOCKER_USERNAME }}/frontend-prod:${{ github.sha }} | ||
| export DOCKER_IMAGE_FRONTEND_PROD=${{ secrets.DOCKER_USERNAME }}/frontend-prod:${{ github.sha }} | ||
| docker compose up -d frontend-prod |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| FROM node:22-alpine | ||
|
|
||
| RUN mkdir -p /home/frontend-prod | ||
|
|
||
| WORKDIR /home/frontend-prod | ||
|
|
||
| COPY package.json package-lock.json ./ | ||
| RUN npm install | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN npm run build | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| CMD ["npm", "run", "start"] |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import Header from '../_components/Header'; | ||
| import Footer from '../_components/Footer'; | ||
|
|
||
| export default function NoLoggedLayout({ | ||
| children, | ||
| }: Readonly<{ | ||
| children: React.ReactNode; | ||
| }>) { | ||
| return ( | ||
| <div className="bg-darkblue text-white"> | ||
| <Header /> | ||
| <main className="px-5 lg:px-16">{children}</main> | ||
| <Footer /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| export default function DesktopForm({ setMode }: { setMode: (mode: string) => void }) { | ||
| return ( | ||
| <div className="hidden lg:flex gap-10 justify-between w-full"> | ||
| <section className="w-[100%] flex flex-col items-center gap-5 max-w-[600px] mx-auto"> | ||
| <header className="flex flex-col items-center gap-1"> | ||
| <h1 className="text-2xl font-extrabold text-center"> | ||
| Mantente Comunicado en Cualquier Lugar | ||
| </h1> | ||
| <h2>Inicia sesión para acceder a tus salas</h2> | ||
| </header> | ||
| <form className="flex flex-col gap-5 w-[80%]"> | ||
| <div className="flex flex-col gap-1"> | ||
| <label htmlFor="email-login-desktop" className="font-bold"> | ||
| Tu correo | ||
| </label> | ||
| <input | ||
| id="email-login-desktop" | ||
| type="text" | ||
| placeholder="Correo electrónico" | ||
| autoComplete="email" | ||
| className="w-full border-1 border-purple-300 p-2 rounded" | ||
| /> | ||
| </div> | ||
| <div> | ||
| <label htmlFor="password-login-desktop" className="font-bold"> | ||
| Tu contraseña | ||
| </label> | ||
| <input | ||
| id="password-login-desktop" | ||
| type="password" | ||
| placeholder="Contraseña" | ||
| className="w-full border-1 border-purple-300 p-2 rounded" | ||
| autoComplete="current-password" | ||
| /> | ||
| </div> | ||
| <button className="bg-purple rounded p-2">Ingresar a la plataforma</button> | ||
| </form> | ||
| <div className="flex gap-1"> | ||
| <p>¿Aún no tienes una cuenta?</p> | ||
| <button className="text-purple cursor-pointer" onClick={() => setMode('register')}> | ||
| Regístrate | ||
| </button> | ||
| </div> | ||
| </section> | ||
|
|
||
| <section className="w-[100%] flex flex-col items-center gap-5 max-w-[600px] mx-auto"> | ||
| <header className="flex flex-col items-center gap-1"> | ||
| <h1 className="text-2xl font-extrabold text-center">Regístrate y Conecta</h1> | ||
| <h2>Podrás guardar tus conversaciones y salas</h2> | ||
| </header> | ||
| <form className="flex flex-col gap-5 w-[80%]"> | ||
| <div className="flex flex-col gap-1"> | ||
| <label htmlFor="user-register-desktop" className="font-bold"> | ||
| Tu ususuario | ||
| </label> | ||
| <input | ||
| id="user-register-desktop" | ||
| type="text" | ||
| placeholder="Correo electrónico" | ||
| className="w-full border-1 border-purple-300 p-2 rounded" | ||
| /> | ||
| </div> | ||
| <div className="flex flex-col gap-1"> | ||
| <label htmlFor="email-register-desktop" className="font-bold"> | ||
| Tu correo | ||
| </label> | ||
| <input | ||
| id="email-register-desktop" | ||
| type="text" | ||
| placeholder="Correo electrónico" | ||
| autoComplete="email" | ||
| className="w-full border-1 border-purple-300 p-2 rounded" | ||
| /> | ||
| </div> | ||
| <div> | ||
| <label htmlFor="password-register-desktop" className="font-bold"> | ||
| Tu contraseña | ||
| </label> | ||
| <input | ||
| id="password-register-desktop" | ||
| type="password" | ||
| placeholder="Contraseña" | ||
| className="w-full border-1 border-purple-300 p-2 rounded" | ||
| autoComplete="current-password" | ||
| /> | ||
| </div> | ||
| <button className="bg-purple rounded p-2">Crear cuenta</button> | ||
| </form> | ||
| <div className="flex gap-1"> | ||
| <p>¿Ya tienes una cuenta?</p> | ||
| <button className="text-purple cursor-pointer" onClick={() => setMode('login')}> | ||
| Inicia sesión | ||
| </button> | ||
| </div> | ||
| </section> | ||
| </div> | ||
| ); | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in label text: 'ususuario' should be corrected to 'usuario'.