Skip to content

Commit

Permalink
Feat/adjustment (#14)
Browse files Browse the repository at this point in the history
* fixed gitignore

* added docker

* adjustments
  • Loading branch information
IvnDmnks authored Oct 11, 2024
1 parent 222e498 commit 658c45f
Show file tree
Hide file tree
Showing 15 changed files with 148 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.DS_Store
.env
40 changes: 40 additions & 0 deletions apps/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Stage 1: Build the application
# Use the official Node.js LTS (Long Term Support) image as the base image
FROM node:20-alpine AS build
ENV NODE_ENV=development

# Set the working directory inside the container
WORKDIR /app

# Copy package.json and yarn.lock to the container
COPY package.json ./

# Install the project dependencies using Yarn
RUN yarn install
COPY . .
RUN yarn prisma generate

# Copy the rest of the project files to the container

# Build the NestJS application
RUN yarn build

# Stage 2: Create a lightweight container with the built application
FROM node:20-alpine AS production
ENV NODE_ENV=production

# Set the working directory inside the container
WORKDIR /app

# Copy the built application from the previous stage
COPY --from=build /app/dist ./dist
COPY --from=build /app/package.json ./package.json
COPY --from=build /app/yarn.lock ./yarn.lock
COPY --from=build /app/prisma ./prisma

# Install only production dependencies
RUN yarn install --production --frozen-lockfile
RUN yarn prisma generate

# Command to run the application
CMD ["node", "dist/main"]
32 changes: 32 additions & 0 deletions apps/backend/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: sprint-review

services:
app:
build:
context: .
ports:
- '${BACKEND_PORT}:${BACKEND_PORT}'
env_file:
- .env
restart: always
networks:
- sprint-review-network
depends_on:
- db

db:
image: postgres:13.10
env_file:
- .env
restart: always
volumes:
- sprint-review_db_folder:/var/lib/postgresql/data
networks:
- sprint-review-network

volumes:
sprint-review_db_folder:
external: true

networks:
sprint-review-network:
2 changes: 1 addition & 1 deletion apps/frontend/src/app/(with-layout)/currentjobs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import CurrentJobs from '../../../components/CurrentJobs';

export default function Home() {
return (
<main className='flex items-center justify-center bg-page-bg-color'>
<main className='flex-1 items-center justify-center bg-page-bg-color'>
<CurrentJobs />
</main>
);
Expand Down
3 changes: 2 additions & 1 deletion apps/frontend/src/app/(with-layout)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Footer } from '../../components/Footer';
import Navbar from '../../components/Navbar';
import Section from '../../components/section';

export default function Layout({
children,
Expand All @@ -9,7 +10,7 @@ export default function Layout({
return (
<div className='flex flex-col min-h-screen'>
<Navbar />
{children}
<Section>{children}</Section>
<Footer />
</div>
);
Expand Down
8 changes: 2 additions & 6 deletions apps/frontend/src/app/(with-layout)/newproject/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import SprintLogin from '../../../components/NewProject';
import NewProject from '../../../components/NewProject';

export default function Home() {
return (
<main className='flex items-center justify-center bg-page-bg-color'>
<SprintLogin />
</main>
);
return <NewProject />;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AfterLogin from '../../../components/AfterLogin';
import AfterLogin from '../../components/AfterLogin';

export default function Home() {
return (
Expand Down
8 changes: 3 additions & 5 deletions apps/frontend/src/components/AfterLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ export default function GreetingsPage() {
</ul>
</a>
<a
href='#'
href='/newproject'
className='block w-64 h-96 max-w-sm p-6 bg-bg-color2 border border-black rounded-lg shadow hover:bg-bg-color1 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700'
>
<h5 className='mb-2 text-2xl font-bold tracking-tight text-text-color dark:text-white'>Profil</h5>
<p className='font-normal text-text-color dark:text-gray-400'>
Itt láthatod a korábbi beszámolóidat, és a profilodat is itt tudod szerkeszteni.
</p>
<h5 className='mb-2 text-2xl font-bold tracking-tight text-text-color dark:text-white'>Új Projekt</h5>
<p className='font-normal text-text-color dark:text-gray-400'>Itt tudsz új projeket nyitni.</p>
</a>
</div>
<a href='https://github.com/kir-dev/sprint-review-app' target='_blank' rel='noreferrer' />
Expand Down
8 changes: 4 additions & 4 deletions apps/frontend/src/components/CurrentJobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export default function CurrentJobs() {
}, []);

return (
<div className='flex flex-col min-h-screen w-1/2'>
<div className='text-center pt-8'>
<h1 className='text-xl font-bold leading-tight tracking-tight text-text-color-h1 md:text-4xl dark:text-bg-color2'>
<div className='flex flex-col w-1/2 mx-auto justify-center'>
<div className='text-center'>
<h1 className='text-xl font-bold leading-tight tracking-tight text-text-color-h1 md:text-4xl dark:text-bg-color2 mt-8'>
Munkák
</h1>
</div>
<div className='flex pt-32 items-center justify-center'>
<div className='flex pt-16 items-center justify-center'>
<div className='text-text-color items-center justify-center w-full'>
<table className='min-w-full max-w-lg text-center text-sm font-light text-surface dark:text-white'>
<thead className='border-b border-neutral-200 font-medium dark:border-white/10 text-2xl'>
Expand Down
6 changes: 0 additions & 6 deletions apps/frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ export default function Navbar() {
>
Munkák
</a>
<a
href='#'
className='w-32 h-32 hover:scale-110 transform transition-transform hover:bg-bg-color1 font-bold py-2 px-4 rounded-lg hover:shadow-lg duration-300'
>
Profil
</a>
</nav>
</header>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/components/NewProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function NewProject() {
};

return (
<div className='w-3/5 flex flex-col justify-center px-8 py-8 mx-auto md:h-screen lg:py-0'>
<div className='w-3/5 flex px-8 py-8 mx-auto lg:py-0'>
<div className='p-6 space-y-4 md:space-y-6 sm:p-8 w-full'>
<h1 className='text-xl font-bold leading-tight tracking-tight text-text-color-h1 md:text-4xl dark:text-bg-color2 w-full text-center'>
Új Projekt Létrehozása
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/components/ReportingPeriod.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export function ReportingPeriod() {
return (
<div className='flex flex-col min-h-screen w-1/2'>
<div className='flex flex-col w-1/2'>
<div className='text-center pt-8'>
<h1 className='text-xl font-bold leading-tight tracking-tight text-text-color-h1 md:text-4xl dark:text-bg-color2'>
Beszámolási időszakok
</h1>
</div>
<div className='flex pt-32 items-center justify-center'>
<div className='flex pt-16 items-center justify-center'>
<div className='text-text-color items-center justify-center w-full'>
<table className='min-w-full max-w-lg text-center text-sm font-light text-surface dark:text-white'>
<thead className='border-b border-neutral-200 font-medium dark:border-white/10 text-2xl'>
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function Footer() {
return (
<footer className='bg-page-bg-color flex flex-col items-center justify-center'>
<p className='text-gray-500 text-sm'>@Kir-Dev pod-oscar</p>
<footer className='bg-page-bg-color flex items-center justify-center'>
<p className='text-gray-500 text-sm mb-8'>@Kir-Dev pod-oscar</p>
</footer>
);
}
7 changes: 7 additions & 0 deletions apps/frontend/src/components/section.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Section({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return <main className='flex-1 items-center justify-center bg-page-bg-color'>{children}</main>;
}
58 changes: 50 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@
resolved "https://registry.npmjs.org/@prisma/client/-/client-5.16.1.tgz"
integrity sha512-wM9SKQjF0qLxdnOZIVAIMKiz6Hu7vDt4FFAih85K1dk/Rr2mdahy6d3QP41K62N9O0DJJA//gUDA3Mp49xsKIg==

"@prisma/client@^5.20.0":
version "5.20.0"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.20.0.tgz#4fc9f2b2341c9c997c139df4445688dd6b39663b"
integrity sha512-CLv55ZuMuUawMsxoqxGtLT3bEZoa2W8L3Qnp6rDIFWy+ZBrUcOFKdoeGPSnbBqxc3SkdxJrF+D1veN/WNynZYA==

"@prisma/debug@5.16.1":
version "5.16.1"
resolved "https://registry.npmjs.org/@prisma/debug/-/debug-5.16.1.tgz"
Expand Down Expand Up @@ -1259,6 +1264,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
dependencies:
color-convert "^2.0.1"

ansi-styles@^6.1.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==

any-promise@^1.0.0:
version "1.3.0"
resolved "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz"
Expand Down Expand Up @@ -1491,7 +1501,7 @@ axobject-query@^3.2.1:
"@nestjs/platform-express" "^10.3.8"
"@nestjs/swagger" "^7.4.2"
"@prisma/client" "^5.13.0"
backend "file:../../../../AppData/Local/Yarn/Cache/v6/npm-backend-0.0.0-9d2570a7-2db9-4bab-a398-809332deec43-1728678325607/node_modules/backend"
backend "file:../../../../AppData/Local/Yarn/Cache/v6/npm-backend-0.0.0-ac0052a7-5985-4d36-9fc7-686a319fc1dc-1728681736380/node_modules/backend"
class-transformer "^0.5.1"
class-validator "^0.14.1"
nestjs-prisma "^0.23.0"
Expand Down Expand Up @@ -2154,6 +2164,11 @@ dotenv@16.4.5:
resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==

eastasianwidth@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==

ecdsa-sig-formatter@1.0.11:
version "1.0.11"
resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz"
Expand Down Expand Up @@ -2904,7 +2919,7 @@ fresh@0.5.2:
axios "^1.7.7"
class-variance-authority "^0.7.0"
clsx "^2.1.0"
frontend "file:../../../../AppData/Local/Yarn/Cache/v6/npm-frontend-0.0.0-3deb19b8-f568-4a87-b4d9-42f343199435-1728678325617/node_modules/frontend"
frontend "file:../../../../AppData/Local/Yarn/Cache/v6/npm-frontend-0.0.0-ce6b1947-96ab-4fef-ac7f-cfa0704af895-1728681736387/node_modules/frontend"
lucide-react "^0.372.0"
next "14.2.2"
react "^18.2.0"
Expand Down Expand Up @@ -4133,7 +4148,7 @@ nestjs-prisma@^0.23.0:
"@kir-dev/passport-authsch" "^2.1.0"
axios "^1.7.2"
bcrypt "^5.1.1"
next-nest-template "file:../../../../AppData/Local/Yarn/Cache/v6/npm-next-nest-template-0.0.0-567f1867-bd30-4379-9091-1a038b392b38-1728678325397/node_modules/next-nest-template"
next-nest-template "file:../../../../AppData/Local/Yarn/Cache/v6/npm-next-nest-template-0.0.0-2053e885-8d11-48e8-a27f-969e2563da43-1728681736386/node_modules/next-nest-template"
react-router-dom "^6.23.1"

next@14.2.2:
Expand Down Expand Up @@ -5233,7 +5248,7 @@ streamsearch@^1.1.0:
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@4.1.0, "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3, string-width@^5.1.2:
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.1.0.tgz#ba846d1daa97c3c596155308063e075ed1c99aff"
integrity sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==
Expand All @@ -5242,6 +5257,24 @@ string-width@4.1.0, "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, s
is-fullwidth-code-point "^3.0.0"
strip-ansi "^5.2.0"

string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^5.0.1, string-width@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==
dependencies:
eastasianwidth "^0.2.0"
emoji-regex "^9.2.2"
strip-ansi "^7.0.1"

string.prototype.matchall@^4.0.10:
version "4.0.11"
resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz"
Expand Down Expand Up @@ -5948,15 +5981,24 @@ wide-align@^1.1.2:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@7.0.0, wrap-ansi@^6.0.1, wrap-ansi@^6.2.0, wrap-ansi@^8.1.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==
dependencies:
ansi-styles "^6.1.0"
string-width "^5.0.1"
strip-ansi "^7.0.1"

wrappy@1:
version "1.0.2"
resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
Expand Down

0 comments on commit 658c45f

Please sign in to comment.