-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add map with locations and deployment (#636)
* feat: add map with locations and deployment * add build scripts * update output * add secret
- Loading branch information
1 parent
c03edff
commit 394b918
Showing
19 changed files
with
877 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM node:lts-alpine AS deps | ||
WORKDIR /app | ||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./ | ||
COPY apps/findbobastore/package.json ./apps/findbobastore/ | ||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 | ||
RUN corepack enable | ||
RUN pnpm install --frozen-lockfile | ||
|
||
FROM node:lts-alpine AS builder | ||
WORKDIR /app | ||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 | ||
RUN corepack enable | ||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY --from=deps /app/apps/findbobastore/node_modules ./apps/findbobastore/node_modules | ||
COPY . . | ||
RUN pnpm build:findbobastore | ||
|
||
FROM node:lts-alpine AS runner | ||
WORKDIR /app | ||
|
||
ENV NODE_ENV=production | ||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
|
||
RUN addgroup --system --gid 1001 nodejs && \ | ||
adduser --system --uid 1001 nextjs | ||
|
||
COPY --from=builder --chown=nextjs:nodejs /app/apps/findbobastore/.next/standalone /app | ||
COPY --from=builder --chown=nextjs:nodejs /app/apps/findbobastore/.next/static /app/apps/findbobastore/.next/static | ||
COPY --from=builder --chown=nextjs:nodejs /app/apps/findbobastore/public /app/apps/findbobastore/public | ||
|
||
USER nextjs | ||
|
||
EXPOSE 3000 | ||
|
||
ENV PORT=3000 | ||
ENV HOSTNAME="0.0.0.0" | ||
|
||
WORKDIR /app/apps/findbobastore | ||
CMD ["node", "server.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import type { NextConfig } from 'next' | ||
|
||
const nextConfig: NextConfig = { | ||
/* config options here */ | ||
output: 'standalone', | ||
poweredByHeader: false, | ||
} | ||
|
||
export default nextConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
import { MapContainer } from '@/components/map-container' | ||
|
||
export default function Home() { | ||
return ( | ||
<div className="flex flex-col items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]"> | ||
<div className="text-4xl font-bold">Find Boba Store</div> | ||
</div> | ||
<main className="relative w-full h-screen"> | ||
<div className="absolute top-4 left-4 z-10 bg-slate-900/80 px-4 py-2 rounded-lg"> | ||
<h1 className="text-xl font-bold text-white">Find Boba Store</h1> | ||
</div> | ||
<MapContainer /> | ||
</main> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use client' | ||
|
||
import dynamic from 'next/dynamic' | ||
|
||
const MapView = dynamic(() => import('./map-view'), { | ||
ssr: false, | ||
loading: () => ( | ||
<div className="w-full h-screen flex items-center justify-center"> | ||
<div className="text-lg">Loading map...</div> | ||
</div> | ||
), | ||
}) | ||
|
||
export function MapContainer() { | ||
return <MapView /> | ||
} |
Oops, something went wrong.