File tree Expand file tree Collapse file tree 4 files changed +57
-1
lines changed
Expand file tree Collapse file tree 4 files changed +57
-1
lines changed Original file line number Diff line number Diff line change 1+ FROM node:22-slim
2+ WORKDIR /app
3+ COPY package*.json ./
4+ RUN npm install
5+ COPY . .
6+ RUN npm run build
7+
8+ COPY nginx.conf /etc/nginx/conf.d/default.conf
9+ RUN apt-get update && \
10+ apt-get install -y nginx && \
11+ apt-get clean && \
12+ rm -rf /var/lib/apt/lists/*
13+
14+ RUN find . -mindepth 1 \
15+ ! -name 'dist' \
16+ ! -name 'entrypoint.sh' \
17+ ! -path './dist/*' \
18+ -ignore_readdir_race \
19+ -exec rm -rf {} + || true
20+
21+
22+ RUN chmod +x ./entrypoint.sh
23+
24+ EXPOSE 8080
25+
26+ ENTRYPOINT ["/app/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ echo STARTING NGINX WEB SERVER
3+ nginx -g " daemon off;"
Original file line number Diff line number Diff line change 1+ server {
2+ listen 8080 ;
3+
4+ location / {
5+ root /app/dist/rss-angular/browser;
6+ index index .html;
7+ try_files $uri $uri / /index .html;
8+ }
9+
10+ error_page 500 502 503 504 /50x .html;
11+
12+ location = 50x .html {
13+ root /app/dist/rss-angular/browser;
14+ }
15+
16+ location /api {
17+ proxy_http_version 1.1;
18+ proxy_set_header Upgrade $http_upgrade ;
19+ proxy_set_header Connection "upgrade" ;
20+ proxy_set_header X-Forwarded-Proto $scheme ;
21+ proxy_set_header X-Forwarded-For $remote_addr ;
22+ proxy_set_header Host $host ;
23+ proxy_cache_bypass $http_upgrade ;
24+ rewrite ^/api( /.*) $ $1 break ;
25+ proxy_pass http ://rss-nest:3600 ;
26+ }
27+ }
Original file line number Diff line number Diff line change 11import { Environment } from './environment.types'
22
33export const environment : Environment = {
4- api : 'http://localhost :3600' ,
4+ api : 'http://rss-nest :3600/api ' ,
55}
You can’t perform that action at this time.
0 commit comments