Skip to content

Commit

Permalink
Update to v18
Browse files Browse the repository at this point in the history
  • Loading branch information
DanWahlin committed Nov 18, 2024
1 parent 90ada91 commit 45d5a88
Show file tree
Hide file tree
Showing 37 changed files with 10,380 additions and 29,337 deletions.
6 changes: 3 additions & 3 deletions .docker/nginx.dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
##### Stage 1
FROM node:16.17.0 as node
FROM node:22 AS node
LABEL author="Dan Wahlin"

ARG NG_APP_API_URL
ENV NG_APP_API_URL=$NG_APP_API_URL

WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install --no-optional
RUN npm install
COPY . .
RUN npm run build

##### Stage 2
FROM nginx:alpine
VOLUME /var/cache/nginx
COPY --from=node /app/dist /usr/share/nginx/html
COPY --from=node /app/dist/angular-jumpstart /usr/share/nginx/html
COPY ./.docker/config/nginx.conf /etc/nginx/conf.d/default.conf

# Run from project root
Expand Down
7 changes: 3 additions & 4 deletions .docker/node.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.17.0-alpine
FROM node:22-alpine

LABEL author="Dan Wahlin"

Expand All @@ -7,11 +7,10 @@ ENV CONTAINER=true
WORKDIR /var/www/node-service

COPY package.json package-lock.json ./
RUN npm install --only=prod --no-optional
RUN npm install --omit=dev --omit=optional

COPY ./server.js .
COPY ./api .
COPY ./data .
COPY ./public ./public

EXPOSE 8080

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
node_modules
npm-debug.log
sandboxes.ts
.angular

# Code Editor Settings
.idea
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Here are a few screenshots from the app:

![](src/assets/images/screenshots/details.png)

<!--
## Running Angular Playground
This application includes Angular Playground (http://www.angularplayground.it) which provides a great way to isolate components in a sandbox rather than loading the
Expand All @@ -65,6 +66,8 @@ entire application to see a given component. To run the playground run the follo
Then open a browser and visit `http://localhost:4201` and follow the directions there (or visit their website for more information).
-->

## Running Cypress End to End Tests

1. Run `npm install cypress --save-dev` to install Cypress.
Expand Down
127 changes: 29 additions & 98 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,139 +4,70 @@
"newProjectRoot": "projects",
"projects": {
"angular-jumpstart": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"architect": {
"build": {
"builder": "@ngx-env/builder:browser",
"options": {
"outputPath": "dist",
"outputPath": "dist/angular-jumpstart",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico"
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
"maximumWarning": "2kB",
"maximumError": "4kB"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@ngx-env/builder:dev-server",
"options": {
"browserTarget": "angular-jumpstart:build"
},
"configurations": {
"production": {
"browserTarget": "angular-jumpstart:build:production"
}
}
},
"extract-i18n": {
"builder": "@ngx-env/builder:extract-i18n",
"options": {
"browserTarget": "angular-jumpstart:build"
}
}
}
},
"playground": {
"projectType": "application",
"root": "",
"sourceRoot": "src",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/playground",
"index": "src/index.html",
"main": ".angular-playground/main.playground.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": ".angular-playground/tsconfig.playground.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "environments/environment.ts",
"with": "environments/environment.prod.ts"
}
],
"buildOptimizer": false,
"extractLicenses": false,
"outputHashing": "all"
"buildTarget": "angular-jumpstart:build:production"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
"buildTarget": "angular-jumpstart:build:development"
}
},
"defaultConfiguration": "development"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "playground:build",
"port": 4201
}
}
}
}
},
"schematics": {
"@schematics/angular:component": {
"prefix": "cm",
"style": "css"
},
"@schematics/angular:directive": {
"prefix": "cm"
}
}
}
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Visit http://localhost
# Live long and prosper

version: '3.7'

services:

nginx:
Expand Down
Loading

0 comments on commit 45d5a88

Please sign in to comment.