Skip to content

Commit 21785d0

Browse files
authored
Merge branch 'develop' into feature/carousel/#18
2 parents 95a5ef0 + d7a22a2 commit 21785d0

32 files changed

+2084
-24
lines changed

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.git
2+
node_modules
3+
.next
4+
5+
.eslintrc.js
6+
.gitignore
7+
.prettierrc
8+
9+
README.md

.env.mock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEXT_PUBLIC_API_MOCKING=enabled

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@
66
"Templete",
77
"userpage"
88
]
9+
"emmet.syntaxProfiles": {
10+
"javascript": "jsx"
11+
},
12+
"emmet.includeLanguages": {
13+
"javascript": "html"
14+
}
915
}

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3'
2+
services:
3+
ma6-main:
4+
image: 2swo/ma6-menbosha-front
5+
ports:
6+
- '3000:3000'
7+
env_file:
8+
- .env
9+
restart: always
10+
environment:
11+
- TZ=Asia/Seoul

dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
FROM node:18-alpine AS base
2+
3+
# Install dependencies only when needed
4+
FROM base AS deps
5+
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
6+
RUN apk add --no-cache libc6-compat
7+
WORKDIR /app
8+
9+
# Install dependencies based on the preferred package manager
10+
COPY package.json package-lock.json* ./
11+
RUN npm ci;
12+
RUN rm -rf ./.next/cache
13+
14+
# Rebuild the source code only when needed
15+
FROM base AS builder
16+
WORKDIR /app
17+
COPY --from=deps /app/node_modules ./node_modules
18+
COPY . .
19+
COPY package.json package-lock.json ./
20+
RUN npm run build
21+
22+
# Next.js collects completely anonymous telemetry data about general usage.
23+
# Learn more here: https://nextjs.org/telemetry
24+
# Uncomment the following line in case you want to disable telemetry during the build.
25+
# ENV NEXT_TELEMETRY_DISABLED 1
26+
# If using npm comment out above and use below instead
27+
# RUN npm run build
28+
29+
# Production image, copy all the files and run next
30+
FROM base AS runner
31+
WORKDIR /app
32+
33+
ENV NODE_ENV=production
34+
# Uncomment the following line in case you want to disable telemetry during runtime.
35+
# ENV NEXT_TELEMETRY_DISABLED 1
36+
37+
RUN addgroup --system --gid 1001 nodejs
38+
RUN adduser --system --uid 1001 nextjs
39+
40+
COPY --from=builder /app/public ./public
41+
42+
# Set the correct permission for prerender cache
43+
RUN mkdir .next
44+
RUN chown nextjs:nodejs .next
45+
46+
# Automatically leverage output traces to reduce image size
47+
# https://nextjs.org/docs/advanced-features/output-file-tracing
48+
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
49+
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
50+
51+
USER nextjs
52+
53+
EXPOSE 3000
54+
55+
ENV PORT 3000
56+
# set hostname to localhost
57+
58+
CMD ["node", "server.js"]

next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3+
output: 'standalone',
34
async redirects() {
45
return [
56
{
@@ -9,6 +10,9 @@ const nextConfig = {
910
},
1011
];
1112
},
13+
images: {
14+
domains: ['https://play-lh.googleusercontent.com/'],
15+
},
1216
reactStrictMode: true,
1317
};
1418

0 commit comments

Comments
 (0)