Skip to content

Commit f21c0e0

Browse files
author
root
committed
add docker
1 parent d00b97f commit f21c0e0

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

.dockerignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Dockerfile
2+
.dockerignore
3+
node_modules
4+
npm-debug.log
5+
README.md
6+
.next
7+
.git

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:20-alpine
2+
3+
ARG BUILD
4+
5+
WORKDIR /app
6+
COPY . .
7+
8+
RUN npm install
9+
10+
RUN npm run build
11+
12+
CMD ["npm", "start"]

docker-compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
nextapp:
3+
container_name: horeca-ui
4+
image: nextapp
5+
build: .
6+
environment:
7+
- NEXT_PUBLIC_APP_BASE_API=http://95.163.222.187
8+
ports:
9+
- "3000:3000"

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
"version": "0.1.0",
55
"private": true,
66
"scripts": {
7+
"docker": "docker compose up --build -d",
78
"dev": "next dev",
89
"build": "next build",
910
"start": "next start",
1011
"lint": "next lint",
1112
"format": "prettier --write \"**/*.{ts,tsx,md,json,css}\"",
12-
"libgen": "npx swagger-typescript-api -p http://95.163.222.187/api-json -o ./src/shared/lib/horekaApi/",
13-
"libgen:dev": "npx swagger-typescript-api -p http://localhost:8080/api-docs-json -o ./src/shared/lib/horekaApi/",
13+
"libgen": "npx swagger-typescript-api@13.0.16 -p http://95.163.222.187/api-json -o ./src/shared/lib/horekaApi/",
14+
"libgen:dev": "npx swagger-typescript-api@13.0.16 -p http://localhost:8080/api-docs-json -o ./src/shared/lib/horekaApi/",
1415
"allgen:rem": "npm run codegen:rem & npm run libgen:rem"
1516
},
1617
"dependencies": {

src/shared/lib/horekaApi/Api.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface UpdateUserDto {
3636
email?: string
3737
phone?: string
3838
password?: string
39-
repeatPassword: string
39+
repeatPassword?: string
4040
profile?: CreateHorecaProfileDto | CreateProviderProfileDto
4141
}
4242

@@ -408,9 +408,9 @@ export class HttpClient<SecurityDataType = unknown> {
408408
input !== null && typeof input !== 'string'
409409
? JSON.stringify(input)
410410
: input,
411-
[ContentType.FormData]: (input: FormData) =>
412-
(Array.from(input.keys()) || []).reduce((formData, key) => {
413-
const property = input.get(key)
411+
[ContentType.FormData]: (input: any) =>
412+
Object.keys(input || {}).reduce((formData, key) => {
413+
const property = input[key]
414414
formData.append(
415415
key,
416416
property instanceof Blob

0 commit comments

Comments
 (0)