Skip to content

Commit 5ed77a5

Browse files
committed
feature/Update_version_docker
1 parent 3817933 commit 5ed77a5

File tree

6 files changed

+6901
-13135
lines changed

6 files changed

+6901
-13135
lines changed

Dockerfile

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
FROM node:14-alpine
1+
FROM node:18-alpine
22

3-
WORKDIR /app
3+
# Set working directory
4+
ENV ROOT="/app"
5+
WORKDIR ${ROOT}
46

5-
RUN apk update && apk upgrade
6-
RUN apk add git
7+
# Copy package.json and package-lock.json before other files
8+
# Utilise Docker cache to save re-installing dependencies if unchanged
9+
COPY ./package*.json ./
10+
COPY ./pnpm-lock.yaml ./
711

8-
COPY ./package*.json /app/
12+
RUN pnpm install --shamefully-hoist
913

10-
RUN npm install && npm cache clean --force
11-
12-
COPY . .
14+
# Copy all files
15+
COPY ./ ./
1316

1417
ENV PATH ./node_modules/.bin/:$PATH

docker-compose.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
version: '3.3'
22

33
services:
4-
nuxt:
4+
nuxt_docker_starter:
55
build:
66
context: .
7-
image: nuxt_dev
8-
container_name: nuxt_dev
7+
image: nuxt_dev_image
8+
container_name: nuxt_dev_container
99
command: npm run dev
1010
volumes:
1111
- .:/app

nuxt.config.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { defineNuxtConfig } from 'nuxt'
2-
3-
// https://v3.nuxtjs.org/api/configuration/nuxt.config
1+
// https://nuxt.com/docs/api/configuration/nuxt-config
42
export default defineNuxtConfig({
5-
6-
})
3+
ssr: process.env.NUXT_DISABLE_SSR !== 'true',
4+
});

0 commit comments

Comments
 (0)