refactoring , dockerizing

This commit is contained in:
Schneider Roland
2025-01-08 17:12:09 +01:00
parent a8b144f554
commit 9d7bb39769
119 changed files with 433 additions and 159 deletions

View File

@@ -10,6 +10,7 @@ WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
RUN echo ""
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
@@ -27,7 +28,7 @@ COPY . .
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED=1
ENV NEXT_TELEMETRY_DISABLED=1
RUN \
if [ -f yarn.lock ]; then yarn run build; \

View File

@@ -11,6 +11,7 @@
"@fortawesome/fontawesome-free": "^6.7.2",
"@types/aos": "^3.0.7",
"@types/bcrypt": "^5.0.2",
"@types/pg": "^8.11.10",
"aos": "^2.3.4",
"bcrypt": "^5.1.1",
"bootstrap": "^4.6.2",
@@ -1156,6 +1157,68 @@
"undici-types": "~6.19.2"
}
},
"node_modules/@types/pg": {
"version": "8.11.10",
"resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.10.tgz",
"integrity": "sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg==",
"dependencies": {
"@types/node": "*",
"pg-protocol": "*",
"pg-types": "^4.0.1"
}
},
"node_modules/@types/pg/node_modules/pg-types": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz",
"integrity": "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==",
"dependencies": {
"pg-int8": "1.0.1",
"pg-numeric": "1.0.2",
"postgres-array": "~3.0.1",
"postgres-bytea": "~3.0.0",
"postgres-date": "~2.1.0",
"postgres-interval": "^3.0.0",
"postgres-range": "^1.1.1"
},
"engines": {
"node": ">=10"
}
},
"node_modules/@types/pg/node_modules/postgres-array": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz",
"integrity": "sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==",
"engines": {
"node": ">=12"
}
},
"node_modules/@types/pg/node_modules/postgres-bytea": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz",
"integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==",
"dependencies": {
"obuf": "~1.1.2"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/@types/pg/node_modules/postgres-date": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz",
"integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==",
"engines": {
"node": ">=12"
}
},
"node_modules/@types/pg/node_modules/postgres-interval": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz",
"integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==",
"engines": {
"node": ">=12"
}
},
"node_modules/@types/react": {
"version": "19.0.2",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.2.tgz",
@@ -4207,6 +4270,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/obuf": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
"integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg=="
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -4368,6 +4436,14 @@
"node": ">=4.0.0"
}
},
"node_modules/pg-numeric": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz",
"integrity": "sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==",
"engines": {
"node": ">=4"
}
},
"node_modules/pg-pool": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.7.0.tgz",
@@ -4504,6 +4580,11 @@
"node": ">=0.10.0"
}
},
"node_modules/postgres-range": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz",
"integrity": "sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w=="
},
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",

View File

@@ -12,6 +12,7 @@
"@fortawesome/fontawesome-free": "^6.7.2",
"@types/aos": "^3.0.7",
"@types/bcrypt": "^5.0.2",
"@types/pg": "^8.11.10",
"aos": "^2.3.4",
"bcrypt": "^5.1.1",
"bootstrap": "^4.6.2",

View File

@@ -5,7 +5,10 @@ class StrapiApi{
}
public getHomePage(){
console.info('Get Home Page');
}
}
const api = new StrapiApi();
export default api;

View File

@@ -48,85 +48,85 @@ const customers = [
},
];
const invoices: any[] = [
// {
// customer_id: customers[0].id,
// amount: 15795,
// status: 'pending',
// date: '2022-12-06',
// },
// {
// customer_id: customers[1].id,
// amount: 20348,
// status: 'pending',
// date: '2022-11-14',
// },
// {
// customer_id: customers[4].id,
// amount: 3040,
// status: 'paid',
// date: '2022-10-29',
// },
// {
// customer_id: customers[3].id,
// amount: 44800,
// status: 'paid',
// date: '2023-09-10',
// },
// {
// customer_id: customers[5].id,
// amount: 34577,
// status: 'pending',
// date: '2023-08-05',
// },
// {
// customer_id: customers[2].id,
// amount: 54246,
// status: 'pending',
// date: '2023-07-16',
// },
// {
// customer_id: customers[0].id,
// amount: 666,
// status: 'pending',
// date: '2023-06-27',
// },
// {
// customer_id: customers[3].id,
// amount: 32545,
// status: 'paid',
// date: '2023-06-09',
// },
// {
// customer_id: customers[4].id,
// amount: 1250,
// status: 'paid',
// date: '2023-06-17',
// },
// {
// customer_id: customers[5].id,
// amount: 8546,
// status: 'paid',
// date: '2023-06-07',
// },
// {
// customer_id: customers[1].id,
// amount: 500,
// status: 'paid',
// date: '2023-08-19',
// },
// {
// customer_id: customers[5].id,
// amount: 8945,
// status: 'paid',
// date: '2023-06-03',
// },
// {
// customer_id: customers[2].id,
// amount: 1000,
// status: 'paid',
// date: '2022-06-05',
// },
const invoices = [
{
customer_id: customers[0].id,
amount: 15795,
status: 'pending',
date: '2022-12-06',
},
{
customer_id: customers[1].id,
amount: 20348,
status: 'pending',
date: '2022-11-14',
},
{
customer_id: customers[4].id,
amount: 3040,
status: 'paid',
date: '2022-10-29',
},
{
customer_id: customers[3].id,
amount: 44800,
status: 'paid',
date: '2023-09-10',
},
{
customer_id: customers[5].id,
amount: 34577,
status: 'pending',
date: '2023-08-05',
},
{
customer_id: customers[2].id,
amount: 54246,
status: 'pending',
date: '2023-07-16',
},
{
customer_id: customers[0].id,
amount: 666,
status: 'pending',
date: '2023-06-27',
},
{
customer_id: customers[3].id,
amount: 32545,
status: 'paid',
date: '2023-06-09',
},
{
customer_id: customers[4].id,
amount: 1250,
status: 'paid',
date: '2023-06-17',
},
{
customer_id: customers[5].id,
amount: 8546,
status: 'paid',
date: '2023-06-07',
},
{
customer_id: customers[1].id,
amount: 500,
status: 'paid',
date: '2023-08-19',
},
{
customer_id: customers[5].id,
amount: 8945,
status: 'paid',
date: '2023-06-03',
},
{
customer_id: customers[2].id,
amount: 1000,
status: 'paid',
date: '2022-06-05',
},
];
const revenue = [

View File

@@ -1,6 +1,8 @@
import bcrypt from 'bcrypt';
import { invoices, customers, revenue, users } from './placeholder-data';
import strapiApi from "@/app/api/strapi/strapi-api";
// const client = await connectionPool.connect();
import connectionPool from "../../db/db";
@@ -108,16 +110,23 @@ export async function GET() {
// 'Uncomment this file and remove this line. You can delete this file when you are finished.',
// });
try {
console.info("get request")
strapiApi.getHomePage();
console.info("begin")
await connectionPool.query(`BEGIN`);
await seedUsers();
await seedCustomers();
// await seedInvoices();
// await seedRevenue();
await seedInvoices();
await seedRevenue();
await connectionPool.query(`COMMIT`);
console.info('Database seeded successfully')
return Response.json({ message: 'Database seeded successfully' });
} catch (error) {
await connectionPool.query(`ROLLBACK`);
console.info("error in seed")
return Response.json({ error }, { status: 500 });
}
}

View File

@@ -1,3 +1,4 @@
import Image from "next/image";
const AboutUsComponent = () =>{
return (
@@ -6,13 +7,13 @@ const AboutUsComponent = () =>{
<div className="row">
<div className="col-lg-7 col-md-7 col-sm-12 col-xs-12">
<div className="aboutus_image">
<figure className="mb-0"><img src="/assets/images/aboutus_image.png" alt="" className="img-fluid"/></figure>
<figure className="mb-0"><Image src="/assets/images/aboutus_image.png" alt="" className="img-fluid"/></figure>
</div>
<figure className="aboutus_top_shape left_shape mb-0">
<img src="/assets/images/aboutus_top_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/aboutus_top_shape.png" alt="" className="img-fluid"/>
</figure>
<figure className="aboutus_bottom_shape left_shape mb-0">
<img src="/assets/images/aboutus_bottom_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/aboutus_bottom_shape.png" alt="" className="img-fluid"/>
</figure>
</div>
<div className="col-lg-5 col-md-5 col-sm-12 col-xs-12" data-aos="fade-right">
@@ -22,7 +23,7 @@ const AboutUsComponent = () =>{
<p>Quis autem vel eum iure reprehenderit qui in eao voluptate velit esse quam nihil molestiae consequatur vel illum.</p>
<div className="aboutus_line_wrapper">
<h6>Modi tempora incidunt ut labore dolore magnam aliquam auerat volutaem.</h6>
<figure className="mb-0 purple_line"><img src="/assets/images/aboutus_line.png" alt="" className="img-fluid" /></figure>
<figure className="mb-0 purple_line"><Image src="/assets/images/aboutus_line.png" alt="" className="img-fluid" /></figure>
</div>
<div className="btn_wrapper">
<a href="/about" className="text-decoration-none get_started_btn">Get Started</a>

View File

@@ -1,3 +1,4 @@
import Image from "next/image";
const BlogPostsComponent = () => {
@@ -16,7 +17,7 @@ const BlogPostsComponent = () => {
<div className="row" data-aos="fade-up">
<div className="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div className="blog_posts_image position-relative">
<figure className="mb-0"><img src="/assets/images/blog_posts_1.png" alt=""
<figure className="mb-0"><Image src="/assets/images/blog_posts_1.png" alt=""
className="img-fluid"/></figure>
<div className="blog_posts_image_content">
<span>YOGA</span>
@@ -30,7 +31,7 @@ const BlogPostsComponent = () => {
</div>
<div className="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div className="blog_posts_image position-relative">
<figure className="mb-0"><img src="/assets/images/blog_posts_2.png" alt=""
<figure className="mb-0"><Image src="/assets/images/blog_posts_2.png" alt=""
className="img-fluid"/></figure>
<div className="blog_posts_image_content">
<span>FITNESS</span>
@@ -47,10 +48,10 @@ const BlogPostsComponent = () => {
<a href="/single-post.html" className="text-decoration-none view_blog">View All Blogs</a>
</div>
<figure className="blog_posts_left_shape left_shape mb-0">
<img src="/assets/images/blog_posts_left_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/blog_posts_left_shape.png" alt="" className="img-fluid"/>
</figure>
<figure className="blog_posts_right_shape right_shape mb-0">
<img src="/assets/images/blog_posts_right_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/blog_posts_right_shape.png" alt="" className="img-fluid"/>
</figure>
</div>
</section>

View File

@@ -1,3 +1,4 @@
import Image from "next/image";
const ContactUsComponent = () => {
@@ -39,7 +40,7 @@ const ContactUsComponent = () => {
<div className="row">
<div className="col-lg-12">
<div className=" form-group mb-0">
<textarea rows="3" name="comment" id="msg" className="form-control"
<textarea rows={3} name="comment" id="msg" className="form-control"
placeholder="Message"></textarea>
</div>
</div>
@@ -56,7 +57,7 @@ const ContactUsComponent = () => {
<a className="popup-vimeo"
href="https://previews.customer.envatousercontent.com/6720474d-ddc3-4b86-acf1-8d093cb37b6d/watermarked_preview/watermarked_preview.mp4">
<figure className="video_img mb-0">
<img className="thumb img-fluid" style={{"cursor": "pointer"}}
<Image className="thumb img-fluid" style={{"cursor": "pointer"}}
src="/assets/images/get_in_touch_video_icon.png" alt=""/>
</figure>
</a>
@@ -64,7 +65,7 @@ const ContactUsComponent = () => {
</div>
</div>
<figure className="get_in_touch_shape left_shape mb-0">
<img src="/assets/images/get_in_touch_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/get_in_touch_shape.png" alt="" className="img-fluid"/>
</figure>
</div>
</section>

View File

@@ -1,3 +1,5 @@
import Link from "next/link";
import Image from "next/image";
const FooterComponent = () => {
@@ -7,10 +9,10 @@ const FooterComponent = () => {
<div className="row">
<div className="col-lg-3 col-md-4 col-sm-6 col-xs-12 d-lg-block d-none">
<div className="footer_logo">
<a href="/index.html" className="text-decoration-none">
<figure className="mb-0"><img src="/assets/images/footer_logo.png" alt=""
<Link href="/index.html" className="text-decoration-none">
<figure className="mb-0"><Image src="/assets/images/footer_logo.png" alt=""
className="img-fluid"/></figure>
</a>
</Link>
</div>
</div>
<div className="col-lg-3 col-md-4 col-sm-6 col-xs-12">
@@ -35,19 +37,19 @@ const FooterComponent = () => {
<h4>Quick Links</h4>
<ul className="list-unstyled">
<li>
<a href="/index.html">Home</a>
<Link href="/index.html">Home</Link>
</li>
<li>
<a href="/about.html">About Us</a>
<Link href="/about.html">About Us</Link>
</li>
<li>
<a href="/services.html">Services</a>
<Link href="/services.html">Services</Link>
</li>
<li>
<a href="/team.html">Team</a>
<Link href="/team.html">Team</Link>
</li>
<li>
<a href="/contact.html">Contact Us</a>
<Link href="/contact.html">Contact Us</Link>
</li>
</ul>
</div>
@@ -81,7 +83,7 @@ const FooterComponent = () => {
</div>
</div>
<div className="footer_shape right_shape">
<figure className="mb-0"><img src="/assets/images/footer_shape.png" alt="" className="img-fluid"/>
<figure className="mb-0"><Image src="/assets/images/footer_shape.png" alt="" className="img-fluid"/>
</figure>
</div>
</section>

View File

@@ -1,3 +1,4 @@
import Image from "next/image";
const HeaderComponent = () => {
return (
@@ -6,7 +7,7 @@ const HeaderComponent = () => {
<div className="main_header">
<div className="container-fluid">
<nav className="navbar navbar-expand-lg navbar-light p-0">
<a className="navbar-brand" href="/index"><figure className="mb-0"><img src="/assets/images/yogastic_logo.png" alt=""/></figure></a>
<a className="navbar-brand" href="/index"><figure className="mb-0"><Image src="/assets/images/yogastic_logo.png" alt=""/></figure></a>
<button className="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span className="navbar-toggler-icon"></span>
<span className="navbar-toggler-icon"></span>
@@ -121,22 +122,22 @@ const HeaderComponent = () => {
<div className="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div className="banner-section-image">
<figure className="mb-0">
<img src="/assets/images/banner_right_image.png" alt="" />
<Image src="/assets/images/banner_right_image.png" alt="" />
</figure>
</div>
</div>
</div>
<figure className="banner_left_top_shape left_shape mb-0">
<img src="/assets/images/banner_left_top_shape.png" alt="" className="img-fluid" />
<Image src="/assets/images/banner_left_top_shape.png" alt="" className="img-fluid" />
</figure>
<figure className="banner_left_bottom_shape left_shape mb-0">
<img src="/assets/images/banner_left_bottom_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/banner_left_bottom_shape.png" alt="" className="img-fluid"/>
</figure>
<figure className="banner_right_top_shape right_shape mb-0">
<img src="/assets/images/banner_right_top_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/banner_right_top_shape.png" alt="" className="img-fluid"/>
</figure>
<figure className="banner_right_bottom_shape right_shape mb-0">
<img src="/assets/images/banner_right_bottom_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/banner_right_bottom_shape.png" alt="" className="img-fluid"/>
</figure>
</div>
</section>

View File

@@ -1,3 +1,5 @@
import Image from "next/image";
const OurServiceComponent = () => {
return (
<section className="services_section">
@@ -16,7 +18,7 @@ const OurServiceComponent = () => {
<div className="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<div className="services_box_content">
<div className="services_box_upper_portion">
<figure className="mb-0"><img src="/assets/images/services_img_1.png" alt=""
<figure className="mb-0"><Image src="/assets/images/services_img_1.png" alt=""
className="img-fluid"/></figure>
</div>
<div className="services_box_lower_portion">
@@ -32,7 +34,7 @@ const OurServiceComponent = () => {
<div className="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<div className="services_box_content">
<div className="services_box_upper_portion">
<figure className="mb-0"><img src="/assets/images/services_img_2.png" alt=""
<figure className="mb-0"><Image src="/assets/images/services_img_2.png" alt=""
className="img-fluid"/></figure>
</div>
<div className="services_box_lower_portion">
@@ -48,7 +50,7 @@ const OurServiceComponent = () => {
<div className="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<div className="services_box_content">
<div className="services_box_upper_portion">
<figure className="mb-0"><img src="/assets/images/services_img_3.png" alt=""
<figure className="mb-0"><Image src="/assets/images/services_img_3.png" alt=""
className="img-fluid"/></figure>
</div>
<div className="services_box_lower_portion">
@@ -64,7 +66,7 @@ const OurServiceComponent = () => {
<div className="col-lg-3 col-md-6 col-sm-6 col-xs-12">
<div className="services_box_content">
<div className="services_box_upper_portion">
<figure className="mb-0"><img src="/assets/images/services_img_4.png" alt=""
<figure className="mb-0"><Image src="/assets/images/services_img_4.png" alt=""
className="img-fluid"/></figure>
</div>
<div className="services_box_lower_portion">
@@ -79,11 +81,10 @@ const OurServiceComponent = () => {
</div>
</div>
<figure className="services_left_shape left_shape mb-0">
<img src="/assets/images/services_left_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/services_left_shape.png" alt="" className="img-fluid"/>
</figure>
</div>
</section>
);
}

View File

@@ -1,3 +1,4 @@
import Image from "next/image";
const OurSpecialitiesComponent = () => {
@@ -34,13 +35,13 @@ const OurSpecialitiesComponent = () => {
<p className="specialties_paragraph">Neque orro quisquam est raui dolorem</p>
</div>
<figure className="specialties_left_line mb-0">
<img src="/assets/images/specialties_left_line.png" alt="" className="img-fluid" />
<Image src="/assets/images/specialties_left_line.png" alt="" className="img-fluid" />
</figure>
</div>
</div>
<div className="col-lg-6 col-md-4 col-sm-6 col-xs-12 d-md-block d-none">
<figure className="specialties_image mb-0">
<img src="/assets/images/specialties_image.png" alt="" className="img-fluid" />
<Image src="/assets/images/specialties_image.png" alt="" className="img-fluid" />
</figure>
</div>
<div className="col-lg-3 col-md-4 col-sm-6 col-xs-12" data-aos="fade-right">
@@ -62,13 +63,13 @@ const OurSpecialitiesComponent = () => {
<p className="specialties_paragraph">Neque orro quisquam est raui dolorem</p>
</div>
<figure className="specialties_right_line mb-0">
<img src="/assets/images/specialties_right_line.png" alt="" className="img-fluid" />
<Image src="/assets/images/specialties_right_line.png" alt="" className="img-fluid" />
</figure>
</div>
</div>
</div>
<figure className="our_specialties_right_shape right_shape mb-0">
<img src="/assets/images/our_specialties_right_shape.png" alt="" className="img-fluid" />
<Image src="/assets/images/our_specialties_right_shape.png" alt="" className="img-fluid" />
</figure>
</div>
</section>

View File

@@ -1,3 +1,4 @@
import Image from "next/image";
const PricingComponent = () => {
@@ -19,11 +20,11 @@ const PricingComponent = () => {
<div className="pricing_plans_box_content">
<div className="pricing_plans_box_upper_portion">
<figure className="pricing_plans_image mb-0">
<img src="/assets/images/pricing_plan_1.png" alt="" className="img-fluid"/>
<Image src="/assets/images/pricing_plan_1.png" alt="" className="img-fluid"/>
</figure>
<div className="pricing_plans_box_image_content">
<figure className="mb-0">
<img src="/assets/images/pricing_plan_icon_1.png" alt="" className="img-fluid"/>
<Image src="/assets/images/pricing_plan_icon_1.png" alt="" className="img-fluid"/>
</figure>
</div>
</div>
@@ -53,11 +54,11 @@ const PricingComponent = () => {
<div className="pricing_plans_box_content">
<div className="pricing_plans_box_upper_portion">
<figure className="pricing_plans_image mb-0">
<img src="/assets/images/pricing_plan_2.png" alt="" className="img-fluid"/>
<Image src="/assets/images/pricing_plan_2.png" alt="" className="img-fluid"/>
</figure>
<div className="pricing_plans_box_image_content">
<figure className="mb-0">
<img src="/assets/images/pricing_plan_icon_2.png" alt="" className="img-fluid"/>
<Image src="/assets/images/pricing_plan_icon_2.png" alt="" className="img-fluid"/>
</figure>
</div>
</div>
@@ -86,11 +87,11 @@ const PricingComponent = () => {
<div className="pricing_plans_box_content">
<div className="pricing_plans_box_upper_portion">
<figure className="pricing_plans_image mb-0">
<img src="/assets/images/pricing_plan_3.png" alt="" className="img-fluid"/>
<Image src="/assets/images/pricing_plan_3.png" alt="" className="img-fluid"/>
</figure>
<div className="pricing_plans_box_image_content">
<figure className="mb-0">
<img src="/assets/images/pricing_plan_icon_3.png" alt="" className="img-fluid"/>
<Image src="/assets/images/pricing_plan_icon_3.png" alt="" className="img-fluid"/>
</figure>
</div>
</div>

View File

@@ -1,3 +1,4 @@
import Image from "next/image";
const QuotesComponent = () => {
@@ -18,7 +19,7 @@ const QuotesComponent = () => {
exercita ionem ullam corporis suscitnis officiis debitis aut rerum
necessitatibus saepe
evenietut aer voluptates</p>
<figure><img src="/assets/images/testimonial_image.png" alt=""
<figure><Image src="/assets/images/testimonial_image.png" alt=""
className="img-fluid"/></figure>
<p className="testimonial_person_name">Himala Joerge</p>
<span>Happy client</span>
@@ -34,7 +35,7 @@ const QuotesComponent = () => {
exercita ionem ullam corporis suscitnis officiis debitis aut rerum
necessitatibus saepe
evenietut aer voluptates</p>
<figure><img src="/assets/images/testimonial_image.png" alt=""
<figure><Image src="/assets/images/testimonial_image.png" alt=""
className="img-fluid"/></figure>
<p className="testimonial_person_name">Himala Joerge</p>
<span>Happy client</span>
@@ -55,10 +56,10 @@ const QuotesComponent = () => {
</div>
</div>
<figure className="testimonial_left_shape left_shape mb-0">
<img src="/assets/images/testimonial_left_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/testimonial_left_shape.png" alt="" className="img-fluid"/>
</figure>
<figure className="testimonial_right_shape right_shape mb-0">
<img src="/assets/images/testimonial_right_shape.png" alt="" className="img-fluid"/>
<Image src="/assets/images/testimonial_right_shape.png" alt="" className="img-fluid"/>
</figure>
</div>
</div>

View File

@@ -1,3 +1,4 @@
import Image from "next/image";
const SubscribeComponent = () => {
return (
@@ -22,7 +23,7 @@ const SubscribeComponent = () => {
</div>
<div className="col-lg-5 col-md-5 col-sm-6 col-xs-12">
<figure className="subscribe_image mb-0">
<img src="/assets/images/subscribe_image.png" alt=""/>
<Image src="/assets/images/subscribe_image.png" alt=""/>
</figure>
</div>
</div>

View File

@@ -1,5 +1,17 @@
const { Pool } = require('pg');
require ('dotenv').config();
import {Pool} from 'pg';
import dotenv from 'dotenv';
if (process.env.NODE_ENV !== 'production') {
console.info('loading dotenv db config')
dotenv.config();
}else{
console.info('DB config environment variable');
console.info('process.env.POSTGRES_HOST',process.env.POSTGRES_HOST);
console.info('process.env.POSTGRES_PORT',process.env.POSTGRES_PORT);
console.info('process.env.POSTGRES_USER',process.env.POSTGRES_USER);
console.info('process.env.POSTGRES_DATABASE',process.env.POSTGRES_DATABASE);
}
const connectionPool = new Pool({
connectionString: process.env.POSTGRES_URL,
@@ -7,7 +19,10 @@ const connectionPool = new Pool({
host: process.env.POSTGRES_HOST,
database: process.env.POSTGRES_DATABASE,
password: process.env.POSTGRES_PASSWORD,
port: process.env.POSTGRES_PORT,
port: parseInt(process.env.POSTGRES_PORT as string, 10),
max: 10,
connectionTimeoutMillis: 2000,
idleTimeoutMillis: 10000,
});
export default connectionPool;