Skip to content

Commit

Permalink
dockerbuils
Browse files Browse the repository at this point in the history
  • Loading branch information
adetyaz committed Dec 4, 2024
1 parent e3f1694 commit 7a9a63b
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals",
"rules": { "react-hooks/exhaustive-deps": "warn" }
}
52 changes: 52 additions & 0 deletions docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docker Build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the code from the repository
- name: Checkout repository
uses: actions/checkout@v2

# Step 2: Set up Node.js and install Yarn
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Yarn
run: corepack enable && corepack prepare yarn@stable --activate

# Step 3: Install dependencies and build the Next.js app
- name: Install dependencies
run: yarn install
- name: Build Next.js app
run: yarn build

# Step 4: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Step 5: Build Docker image
- name: Build Docker image
run: docker build -t webxr .

# Step 6: Test the Docker container
- name: Run Docker container
run: docker run -d -p 3000:3000 --name webxr webxr
- name: Test if container is running
run: |
sleep 5 # Wait for the container to start
curl -f http://localhost:3000 || exit 1
# Step 7: Cleanup
- name: Stop and remove Docker container
run: docker stop webxr && docker rm webxr
16 changes: 0 additions & 16 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,13 @@ export const metadata: Metadata = {
title: 'WebXR | MyriadFlow',
description:
'The future of shopping is here! MyriadFlow lets you chat with lifelike AI brand ambassadors about your favorite products, all within a captivating VR experience.',
images: [
{
url: '/metaimg.png', // Path to the image in the public folder
width: 1200,
height: 630,
alt: 'MyriadFlow WebXR',
},
],
},
twitter: {
card: 'summary_large_image',
site: '@MyriadFlow',
title: 'WebXR | MyriadFlow',
description:
'The future of shopping is here! MyriadFlow lets you chat with lifelike AI brand ambassadors about your favorite products, all within a captivating VR experience.',
images: [
{
url: '/metaimg.png', // Path to the image in the public folder
width: 1200,
height: 630,
alt: 'MyriadFlow WebXR',
},
],
},
}

Expand Down
24 changes: 20 additions & 4 deletions src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,13 @@ const Header = ({
>
<div className='container mx-auto flex justify-between items-center'>
<a href='/' className='flex items-center'>
<img src={'/logo.png'} className='w-32 md:w-48' alt='Logo' />
<img
src={'/logo.png'}
height={128}
width={128}
className='w-32 md:w-48'
alt='Logo'
/>
</a>
<div
className={`items-center space-x-8 text-lg font-bold hidden ${
Expand Down Expand Up @@ -188,25 +194,29 @@ const Header = ({
onClick={() => setIsProfileMenuOpen(!isProfileMenuOpen)}
className='focus:outline-none'
>
<img
<Image
src={
profileImage
? `${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/${profileImage}`
: '/profile.png'
}
alt='Profile'
height={40}
width={40}
className='w-10 h-10 rounded-full'
/>
</button>
{isProfileMenuOpen && (
<div className='absolute sm:right-0 mt-2 p-2 sm:p-4 bg-white text-black rounded-lg shadow-lg w-64'>
<div className='flex items-center mb-4'>
<img
<Image
src={
profileImage
? `${process.env.NEXT_PUBLIC_GATEWAY_URL}/ipfs/${profileImage}`
: '/profile.png'
}
height={40}
width={40}
alt='Profile'
className='w-10 h-10 rounded-full mr-2'
/>
Expand Down Expand Up @@ -336,7 +346,13 @@ const Header = ({
onClick={() => setIsDropdownOpen(false)}
className='absolute top-4 right-4 text-xl text-gray-700'
>
<img src='/close.png' alt='Close' className='w-12 h-12' />
<Image
src='/close.png'
alt='Close'
height={48}
width={48}
className='w-12 h-12'
/>
</button>
<Link
href='https://myriadflow.com'
Expand Down

0 comments on commit 7a9a63b

Please sign in to comment.