File tree Expand file tree Collapse file tree 5 files changed +9
-25
lines changed
Expand file tree Collapse file tree 5 files changed +9
-25
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ RUN groupadd --gid 1000 user_skf && useradd --uid 1000 --gid user_skf -m user_sk
2424
2525ADD ./ /home/user_skf/
2626RUN chmod a+rw /home/user_skf/skf/db /home/user_skf/skf/db/*
27- COPY ./Docker/alpine/skf-angular.sh /skf-angular.sh
2827COPY ./Docker/alpine/entrypoint.sh /entrypoint.sh
2928COPY ./Docker/alpine/skf-api.sh /skf-api.sh
3029COPY ./Docker/alpine/wrapper.sh /wrapper.sh
@@ -42,8 +41,10 @@ RUN apt update &&\
4241 openssl
4342
4443WORKDIR /home/user_skf/Angular
45- RUN npm install -g @angular/cli > /dev/null
46- RUN npm install
44+ RUN perl -pi -e "s/http:\/\/ 127.0.0.1:8888\/ api/https:\/\/ localhost\/ api/" /home/user_skf/Angular/src/environments/environment.ts
45+
46+ RUN npm --loglevel=error install &&\
47+ npm run build --prod
4748
4849EXPOSE 443 80
4950
Original file line number Diff line number Diff line change @@ -22,16 +22,12 @@ server {
2222 ssl_ciphers 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256';
2323 ssl_prefer_server_ciphers on;
2424
25- root /home/user_skf/Angular;
25+ root /home/user_skf/Angular/dist ;
2626 charset utf-8;
2727
2828 location / {
29- proxy_pass http://localhost:4200 ;
29+ try_files $uri $uri/ /index.html =404 ;
3030 proxy_http_version 1.1;
31- proxy_set_header Upgrade $http_upgrade;
32- proxy_set_header Connection 'upgrade';
33- proxy_set_header Host $host;
34- proxy_cache_bypass $http_upgrade;
3531 }
3632
3733 location /api/ {
Original file line number Diff line number Diff line change 33server {
44 listen 80 default_server;
55
6- root /home/user_skf/Angular;
6+ root /home/user_skf/Angular/dist ;
77 charset utf-8;
88
99 location / {
10- proxy_pass http://localhost:4200 ;
10+ try_files $uri $uri/ /index.html =404 ;
1111 proxy_http_version 1.1;
12- proxy_set_header Upgrade $http_upgrade;
13- proxy_set_header Connection 'upgrade';
14- proxy_set_header Host $host;
15- proxy_cache_bypass $http_upgrade;
1612 }
1713
1814 location /api/ {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2424
2525while /bin/true; do
2626 PROCESS_1_STATUS=$( ps aux | grep -q skf-api* | grep -v grep)
27- PROCESS_2_STATUS=$( ps aux | grep -q skf-angular* | grep -v grep)
2827 # If the greps above find anything, they will exit with 0 status
2928 # If they are not both 0, then something is wrong
30- if [[ $PROCESS_1_STATUS -ne ' 0' || $PROCESS_2_STATUS -ne ' 0 ' ]]; then
29+ if [[ $PROCESS_1_STATUS -ne ' 0' ]]; then
3130 echo " One of the processes has already exited."
3231 exit -1
3332 fi
You can’t perform that action at this time.
0 commit comments