Skip to content

Commit

Permalink
Remove server-side rendering support
Browse files Browse the repository at this point in the history
  • Loading branch information
sentemon committed Jan 4, 2025
1 parent e3388f7 commit 04be65d
Show file tree
Hide file tree
Showing 10 changed files with 1,324 additions and 1,699 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
context: ./frontend
dockerfile: Dockerfile
ports:
- "4000:4000"
- "4200:4200"
depends_on:
post-service:
condition: service_healthy
Expand Down
10 changes: 7 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM node:20.17.0 AS build
WORKDIR /app

RUN npm install -g @angular/cli@18.2.12

COPY package*.json ./
RUN npm install

Expand All @@ -11,11 +13,13 @@ RUN npm run build -- --configuration production
FROM node:20.17.0
WORKDIR /app

RUN npm install -g @angular/cli@18.2.12

COPY --from=build /app/dist /app/dist
COPY package*.json ./

RUN npm install --production

EXPOSE 4000

CMD ["npm", "run", "serve:ssr:frontend"]
EXPOSE 4200
# Todo: change the way to run
CMD npx http-server ./dist/frontend --port 4200 --host 0.0.0.0
11 changes: 3 additions & 8 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/frontend",
"index": "src/index.html",
"browser": "src/main.ts",
"main": "src/main.ts",
"polyfills": [
"zone.js"
],
Expand All @@ -31,12 +31,7 @@
"styles": [
"src/styles.scss"
],
"scripts": [],
"server": "src/main.server.ts",
"prerender": true,
"ssr": {
"entry": "server.ts"
}
"scripts": []
},
"configurations": {
"production": {
Expand Down
Loading

0 comments on commit 04be65d

Please sign in to comment.