diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3a8fe5e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.env.local \ No newline at end of file diff --git a/.env b/.env deleted file mode 100644 index 0b3d183..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -NEXT_PUBLIC_URL=localhost:3000 \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..b8167d0 --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +NEXT_PUBLIC_URL=amirmoghi3.ir +NODE_OPTIONS=--max_old_space_size=4098 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..35fad25 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM registry.vnfco.ir/library/node:14-alpine AS deps +RUN apk add --no-cache libc6-compat +WORKDIR /app +COPY package.json ./ +RUN yarn install --production + + +FROM registry.vnfco.ir/library/node:14-alpine AS builder +WORKDIR /app +ARG NODE_ENV=production +COPY . . +COPY --from=deps /app/node_modules ./node_modules +RUN yarn run build + + +FROM registry.vnfco.ir/library/node:14-alpine AS runner +WORKDIR /app +ARG NODE_ENV=production +COPY --from=builder /app/public ./public +COPY --from=builder /app/.next ./.next +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/package.json ./package.json +COPY --from=builder /app/.env.production ./.env.production +EXPOSE 3000 +ENV PORT 3000 +CMD ["node_modules/.bin/next", "start"] \ No newline at end of file diff --git a/buildAndPushDocker.sh b/buildAndPushDocker.sh new file mode 100644 index 0000000..c5345b6 --- /dev/null +++ b/buildAndPushDocker.sh @@ -0,0 +1,14 @@ +#/!bin/sh +defaultVersionValue=$(head -1 .version); +read -p "Enter Version : " version +version=${version:-$defaultVersionValue} +echo "version : $version" + + + + + +docker build -t registry.vnfco.ir/amirmoghi3/me:latest -t registry.vnfco.ir/amirmoghi3/me:$version . || exit 1; +docker push registry.vnfco.ir/ig/website:latest || exit 1; +docker push registry.vnfco.ir/ig/website:$version || exit 1; + diff --git a/components/Journey/index.tsx b/components/Journey/index.tsx index d0bcc64..e1ec13b 100644 --- a/components/Journey/index.tsx +++ b/components/Journey/index.tsx @@ -1,16 +1,23 @@ +type Props = { + title: string, + description: string, + tags: string[], + year?: string | number, + url?: string, + isLunched?: boolean +} + - - -const Journey = ({ title, description, tags, year, url, isLunched }) => { +const Journey = ({ title, description, tags, year, url, isLunched }: Props) => { return (
{description}
+ {tags.map((tag, i) => ( +
{`#${tag}`}
))} diff --git a/components/SpecialistBar/index.tsx b/components/SpecialistBar/index.tsx index e3eda2b..a5b80a5 100644 --- a/components/SpecialistBar/index.tsx +++ b/components/SpecialistBar/index.tsx @@ -1,7 +1,11 @@ +type Props = { + title: string, + percent: number, +} -export const LinearSpeacialistBar = ({ title, percent }) => { +export const LinearSpeacialistBar = ({ title, percent }: Props) => { return (