init
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -1,23 +1,12 @@
|
|||||||
# -- Build stage --
|
# Simple static site image: serve the contents of /public with nginx
|
||||||
FROM node:20-alpine AS build
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Alleen package-bestanden eerst (better caching)
|
|
||||||
COPY package*.json ./
|
|
||||||
RUN npm ci || npm install
|
|
||||||
|
|
||||||
# Dan de rest van de code
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# LET OP: pas dit aan als jouw build-script anders heet
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# -- Serve stage --
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
WORKDIR /usr/share/nginx/html
|
WORKDIR /usr/share/nginx/html
|
||||||
|
|
||||||
# Pas dit aan als jouw outputmap niet 'dist' is (bijv. 'build')
|
# Copy static files
|
||||||
COPY --from=build /app/dist ./
|
COPY public/ ./
|
||||||
|
|
||||||
# Optioneel: eigen nginx.conf voor SPA routing
|
# If the site references additional resources, copy them too
|
||||||
|
COPY resources/ ./resources
|
||||||
|
|
||||||
|
# Optional: provide your own nginx.conf for SPA routing
|
||||||
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
11
resources/OLD.json
Normal file
11
resources/OLD.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "nex",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "nex - overview",
|
||||||
|
"maintainers": [
|
||||||
|
"michael@appmodel.nl"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "mkdir -p dist && cp -r public/* dist/"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user