Skip to content

Commit 4ba0adb

Browse files
authored
only copy .output folder for built nuxt apps (#139)
1 parent 1344fd6 commit 4ba0adb

File tree

5 files changed

+3783
-7792
lines changed

5 files changed

+3783
-7792
lines changed

templates/Dockerfile.ejs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ RUN cd bundle/bundle/programs/server && meteor npm install
120120
# Build application
121121
RUN <%- mountSecrets %><%= build %>
122122
123-
<% if (devDependencies && !options.dev && !nestjs && !adonisjs && !prismaSeed) { -%>
123+
<% if (devDependencies && !options.dev && !nestjs && !adonisjs && !prismaSeed && !nuxtjs) { -%>
124124
# Remove development dependencies
125125
RUN <%- buildCache %><%- packagerPrune %>
126126
@@ -188,6 +188,8 @@ COPY --from=build /app/bundle/bundle /app
188188
COPY --from=build /app/.next/standalone /app
189189
COPY --from=build /app/.next/static /app/.next/static
190190
COPY --from=build /app/public /app/public
191+
<% } else if (nuxtjs) { -%>
192+
COPY --from=build /app/.output /app/.output
191193
<% } else { -%>
192194
COPY --from=build /app /app
193195
<% } -%>

test/frameworks/nuxt-prisma/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN wget https://github.com/benbjohnson/litestream/releases/download/v0.3.13/lit
4949
rm litestream-v0.3.13-linux-amd64.deb
5050

5151
# Copy built application
52-
COPY --from=build /app /app
52+
COPY --from=build /app/.output /app/.output
5353

5454
# Setup sqlite3 on a separate volume
5555
RUN mkdir -p /data

test/frameworks/nuxt/Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,12 @@ COPY . .
3232
# Build application
3333
RUN yarn run build
3434

35-
# Remove development dependencies
36-
RUN yarn install --production=true
37-
3835

3936
# Final stage for app image
4037
FROM base
4138

4239
# Copy built application
43-
COPY --from=build /app /app
40+
COPY --from=build /app/.output /app/.output
4441

4542
# Start the server by default, this can be overwritten at runtime
4643
EXPOSE 3000

test/frameworks/nuxt/package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {
6-
"dev": "nuxt",
6+
"dev": "nuxt dev",
77
"build": "nuxt build",
8-
"start": "nuxt start",
98
"generate": "nuxt generate"
109
},
1110
"dependencies": {
12-
"core-js": "^3.32.1",
13-
"nuxt": "^2.17.1",
14-
"vue": "^2.7.14",
15-
"vue-server-renderer": "^2.7.14",
16-
"vue-template-compiler": "^2.7.14"
11+
"nuxt": "^3.16.1"
1712
},
13+
"packageManager": "yarn@1.22.21",
1814
"devDependencies": {}
1915
}

0 commit comments

Comments
 (0)