Skip to content

Commit

Permalink
removed unnecesary stuff and updated docker yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MateoGlzAlon committed Jan 15, 2025
1 parent acaecfa commit 6dfd7f5
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 1,027 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,38 @@ on:
jobs:
build:

if: ${{ github.event.workflow_run.conclusion == 'success' }} # Check that the previous workflow was successful
if: ${{ github.event.workflow_run.conclusion == 'success' }}

runs-on: ubuntu-latest

steps:
# Step 1: Check out the repository
- uses: actions/checkout@v4

# Step 1: Log in to Docker Hub
# Step 2: Log in to Docker Hub
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin


# Step 3: Build the Docker image with secrets
# Step 3: Generate a date-based tag
- name: Generate date-based tag
run: echo "IMAGE_TAG=$(date +'%d-%m-%Y')" >> $GITHUB_ENV

# Step 4: Build the Docker image
- name: Build the Docker image
run: |
docker build . \
--file Dockerfile \
--tag raisehub_fe:latest \
# Step 4: Tag the Docker image with the repository name
--tag raisehub_fe:latest
# Step 5: Tag the Docker image with the repository name
- name: Tag the Docker image
run: |
docker tag raisehub_fe:latest ${{ secrets.DOCKER_USERNAME }}/raisehub_frontend:latest
docker tag raisehub_fe:latest ${{ secrets.DOCKER_USERNAME }}/raisehub_frontend:${{ env.IMAGE_TAG }}
# Step 5: Push the Docker image
- name: Push the Docker image
# Step 6: Push the Docker images
- name: Push the Docker images
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/raisehub_frontend:latest
docker push ${{ secrets.DOCKER_USERNAME }}/raisehub_frontend:${{ env.IMAGE_TAG }}
# Step 6: Run the Docker container with secrets
- name: Run the Docker container
run: |
docker run -d \
-e AWS_BUCKET_NAME=${{ secrets.AWS_BUCKET_NAME }} \
-e AWS_BUCKET_REGION=${{ secrets.AWS_BUCKET_REGION }} \
-e AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }} \
-e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
-p 3000:3000 \
raisehub_fe:latest
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started
```
docker run -d --env-file .env --name raisehub_frontend_container -p 3000:3000 mateogonzalezz/raisehub_frontend:<tag>
```
4 changes: 2 additions & 2 deletions app/(pages)/login/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ export default function LoginPage() {
<div className="flex flex-col justify-center items-center w-1/2 bg-gray-100 p-8">
<Image
src="/logoColor.svg" // Replace with your image path
alt="RaiseHub"
alt={`${DATA.projectName} Logo`}
width={400}
height={400}
onClick={() => router.push("/")}
className="mb-6 cursor-pointer"
/>
<h1 className="text-4xl font-extrabold text-gray-900" onClick={() => router.push("/")}>
RaiseHub
{DATA.projectName}
</h1>
<p className="mt-4 text-lg text-gray-600">
Join the community and bring your favorite projects to life!
Expand Down
5 changes: 3 additions & 2 deletions app/(pages)/register/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useState } from 'react';
import { useRouter } from 'next/navigation';
import { Button } from '@/components/ui/button'; // Using your existing Button component
import Image from 'next/image';
import { DATA } from '@/app/data';

import registerUserPOST from '@/components/fetchComponents/POST/registerUserPOST';

Expand Down Expand Up @@ -53,14 +54,14 @@ export default function RegisterPage() {
<div className="flex flex-col justify-center items-center lg:w-1/2 w-full bg-gray-100 p-8">
<Image
src="/logoColor.svg" // Replace with your image path
alt="RaiseHub Logo"
alt={`${DATA.projectName} Logo`}
onClick={() => router.push('/')}
width={400}
height={400}
className="mb-6 cursor-pointer"
/>
<h1 className="text-4xl font-extrabold text-gray-900" onClick={() => router.push('/')} >
RaiseHub
{DATA.projectName}
</h1>
<p className="mt-4 text-lg text-gray-600">Join the community and bring your favorite projects to life!</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/generalComponents/pageFrame/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function Footer() {
</a>
</div>
<p className="mt-4 text-gray-500">
© {new Date().getFullYear()} RaiseHub. All rights reserved.
© {new Date().getFullYear()} {DATA.projectName}. All rights reserved.
</p>
</div>
</footer>
Expand Down
115 changes: 0 additions & 115 deletions components/toBeRemoved/Tests3db.jsx

This file was deleted.

Loading

0 comments on commit 6dfd7f5

Please sign in to comment.