Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM node:14-alpine
FROM node:18-alpine

WORKDIR /app
# Set working directory
ENV ROOT="/app"
WORKDIR ${ROOT}

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

COPY ./package*.json /app/
RUN pnpm install --shamefully-hoist

RUN npm install && npm cache clean --force

COPY . .
# Copy all files
COPY ./ ./

ENV PATH ./node_modules/.bin/:$PATH
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3.3'

services:
nuxt:
nuxt_docker_starter:
build:
context: .
image: nuxt_dev
container_name: nuxt_dev
image: nuxt_dev_image
container_name: nuxt_dev_container
command: npm run dev
volumes:
- .:/app
Expand Down
7 changes: 2 additions & 5 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { defineNuxtConfig } from 'nuxt'

// https://v3.nuxtjs.org/api/configuration/nuxt.config
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({

})
});
Loading