Skip to content

Commit

Permalink
Updated website and added dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
BE-CH committed Jul 5, 2024
1 parent f7f8eeb commit c5b4147
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 24 deletions.
67 changes: 67 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
FROM node:18-alpine AS base

# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi


# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
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

RUN \
if [ -f yarn.lock ]; then yarn run build; \
elif [ -f package-lock.json ]; then npm run build; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
else echo "Lockfile not found." && exit 1; \
fi

# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

EXPOSE 3000

ENV PORT 3000

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD HOSTNAME="0.0.0.0" node server.js
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
reactStrictMode: true,
output: 'standalone',
};
33 changes: 17 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"export": "next build && next export"
},
"dependencies": {
"next": "12.3.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"next": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typed.js": "^2.0.12"
},
"devDependencies": {
Expand Down
11 changes: 6 additions & 5 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,22 @@ export default function Home() {

<div className={styles.grid}>
<div className={styles.aboutMeCard}>
<img className={styles.profileImage} alt="Mikkel Bech @ Bech Solutions" src="./mikkelbech_color.jpg" />
<img className={styles.profileImage} alt="Mikkel Bech @ Bech Solutions" src="./mikkelbech_color.jpeg" />
<h2>Mikkel Bech</h2>
<p>
I am a 23 years old web developer that focuses on delivering modern, scaleable and high quality web
I am a 25 years old web developer that focuses on delivering modern, scaleable and high quality web
solutions. ⚡🚀
</p>
</div>

<div className={styles.card}>
<h2>My skills &rarr;</h2>
<p>
My primary focus is <mark>Javascript</mark>, <mark>Typescript</mark>, <mark>HTML</mark> and{' '}
<mark>CSS</mark>. I have worked with front-end libraries such as <mark>React.js</mark>,{' '}
My primary focus is <mark>C#</mark>, <mark>Javascript</mark>, <mark>Typescript</mark>, <mark>HTML</mark>{' '}
and <mark>CSS</mark>. I have worked with front-end libraries such as <mark>React.js</mark>,{' '}
<mark>Next.js</mark>, <mark>Svelte</mark>, <mark>Fabric.js</mark> and more. In terms of back-end I have
been working with <mark>Node.js</mark>, <mark>Nest.js</mark>, <mark>Express.js</mark> and more!
been working with <mark>Node.js</mark>, <mark>Nest.js</mark>, <mark>Express.js</mark>, <mark>.NET</mark>,{' '}
<mark>ASPNET Core</mark> and more!
</p>
<br />
<p>
Expand Down
Binary file removed public/mikkelbech_bh.jpg
Binary file not shown.
Binary file added public/mikkelbech_color.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/mikkelbech_color.jpg
Binary file not shown.

0 comments on commit c5b4147

Please sign in to comment.