feat(docker): basic docker config for back and front with minor linter fixes
This commit is contained in:
15
back/Dockerfile
Normal file
15
back/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM node:21-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "run", "serve"]
|
||||
@@ -1,6 +1,14 @@
|
||||
version: "1.2"
|
||||
|
||||
services:
|
||||
# front:
|
||||
# build:
|
||||
# context: ./front
|
||||
# dockerfile: Dockerfile
|
||||
# container_name: nextjs-app
|
||||
# ports:
|
||||
# - "3016:3016"
|
||||
#
|
||||
mysql:
|
||||
image: mysql
|
||||
restart: always
|
||||
|
||||
16
front/Dockerfile
Normal file
16
front/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM node:21-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 3016
|
||||
|
||||
# Start the NestJS application
|
||||
CMD ["npm", "run", "start"]
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Suspense } from "react";
|
||||
import { LogInWidget } from "../../components/log-in/log-in.widget";
|
||||
import styles from "./log-in.module.scss";
|
||||
|
||||
@@ -5,8 +6,10 @@ type LogInWidgetsProps = {};
|
||||
|
||||
export const LogInView: React.FC<LogInWidgetsProps> = ({}) => {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<LogInWidget />
|
||||
</div>
|
||||
<Suspense>
|
||||
<div className={styles.container}>
|
||||
<LogInWidget />
|
||||
</div>
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ export const NavbarHeader = (props: PropsWithChildren) => {
|
||||
return (
|
||||
<header className={styles.header}>
|
||||
<Link href={"/"} className={styles.logo}>
|
||||
<img src="/main-logo.svg" />
|
||||
<img src="/main-logo.svg" alt="Main logo" />
|
||||
<h1>Your brand</h1>
|
||||
</Link>
|
||||
<nav>{props.children}</nav>
|
||||
|
||||
@@ -47,7 +47,7 @@ export function useQuery<DataType>({
|
||||
setIsLoading(false);
|
||||
}
|
||||
})();
|
||||
}, [url, JSON.stringify(options), timeout, session.status]);
|
||||
}, [url, options, timeout, session.status]);
|
||||
|
||||
return { ...response, isLoading, isError };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user