Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: slim-docker-github-action #20

Merged
merged 32 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a06c386
build: slim-docker-github-action
luojiyin1987 Jul 24, 2024
fc1918b
try: change build-push-action version
luojiyin1987 Jul 24, 2024
a1777f8
set build action env
luojiyin1987 Jul 24, 2024
b26b50e
show docker images
luojiyin1987 Jul 24, 2024
a55ba33
show docker images
luojiyin1987 Jul 24, 2024
ba773df
show docker images
luojiyin1987 Jul 24, 2024
112b8a6
set chmod
luojiyin1987 Jul 24, 2024
eeea8b8
fix: side effects
luojiyin1987 Jul 24, 2024
12724b4
build: use slim image
luojiyin1987 Jul 24, 2024
240ab90
build: change dockerignore
luojiyin1987 Jul 24, 2024
7c7180a
build: change Dockerfile
luojiyin1987 Jul 24, 2024
5e9d735
set DSLIM_INCLUDE_APP_NEXT_DIR
luojiyin1987 Jul 24, 2024
9574e82
set next var
luojiyin1987 Jul 24, 2024
2102c43
fix from review
luojiyin1987 Jul 28, 2024
ed6154d
fix from review
luojiyin1987 Jul 28, 2024
10186b7
fix from review
luojiyin1987 Jul 28, 2024
1f2d647
use google distroless nodejs18
luojiyin1987 Aug 2, 2024
4930cb0
inclue ./next
luojiyin1987 Aug 2, 2024
3341f5a
inclue ./next
luojiyin1987 Aug 2, 2024
02e9ac9
inclue ./next
luojiyin1987 Aug 2, 2024
5bef0ac
inclue /.next
luojiyin1987 Aug 2, 2024
6fcfc64
inclue node_modules
luojiyin1987 Aug 2, 2024
c68799c
disable slim docker action
luojiyin1987 Aug 2, 2024
82fff62
remove slim
luojiyin1987 Aug 2, 2024
d316c24
use standalone
luojiyin1987 Aug 2, 2024
14b8d14
use base image
luojiyin1987 Aug 2, 2024
e8acd42
code clear
luojiyin1987 Aug 2, 2024
d5111af
code clear
luojiyin1987 Aug 2, 2024
9932dc3
restore action
luojiyin1987 Aug 3, 2024
e90e904
set env to solve unhealthy
luojiyin1987 Aug 3, 2024
cf192c2
Update Dockerfile
TechQuery Aug 3, 2024
668b872
Update Dockerfile
TechQuery Aug 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ RUN corepack enable
COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i -P --frozen-lockfile --ignore-scripts

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile
RUN pnpm build

FROM base
COPY --from=prod-deps /app/node_modules ./node_modules
COPY --from=build /app/.next/standalone ./
COPY --from=build /app/public ./public
COPY --from=build /app/.next ./.next
COPY --from=build /app/.next/static ./.next/static
EXPOSE 3000
CMD ["npm", "start"]
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"]
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const withPWA = setPWA({
const nextConfig = withPWA(
withLess(
withMDX({
output: 'standalone',
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],

webpack: config => {
Expand Down