File tree Expand file tree Collapse file tree 6 files changed +14
-30
lines changed
Expand file tree Collapse file tree 6 files changed +14
-30
lines changed Original file line number Diff line number Diff line change 7070 working-directory : ./backend
7171 run : npm install
7272
73- # - name: Unlock migrations
74- # working-directory: ./backend
75- # env:
76- # DATABASE_URL: postgres://postgres:postgres@localhost:5432/testdb
77- # run: npx knex migrate:unlock
78-
7973 - name : Run backend tests
8074 working-directory : ./backend
8175 env :
@@ -103,12 +97,6 @@ jobs:
10397 with :
10498 node-version : ' 22'
10599
106- # - name: Configure AWS credentials
107- # uses: aws-actions/configure-aws-credentials@v1
108- # with:
109- # role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_ROLE_NAME }}
110- # aws-region: ${{ env.AWS_REGION }}
111-
112100 - name : Configure AWS credentials
113101 uses : aws-actions/configure-aws-credentials@v1
114102 with :
@@ -130,11 +118,6 @@ jobs:
130118 --zip-file fileb://backend/migrate-lambda/migrate-package.zip \
131119 --region ${{ env.AWS_REGION }}
132120
133- # Maybe we need this? Need to do some experimenting.
134- # - name: Wait for update completion
135- # run: |
136- # aws lambda get-function-configuration --function-name my-lambda-function --query 'LastUpdateStatus' --output text | while [ "$REPLY" != "Successful" ]; do aws lambda get-function-configuration --function-name my-lambda-function --query 'LastUpdateStatus' --output text; sleep 5; done
137-
138121 - name : Wait for Lambda update
139122 run : |
140123 max_attempts=100
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ COPY frontend /app/frontend
1212
1313RUN npm install -g @angular/cli
1414
15- RUN npm run build --prod
15+ RUN npm run build:dev
1616
1717# Stage 2: Prepare to serve the Angular application with Nginx
1818FROM nginx:alpine AS nginx
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ RUN npm install
99
1010COPY . .
1111
12- # WORKDIR /app/backend
13-
1412RUN npm run build
1513
1614# Stage 2: Prepare to serve the application
@@ -21,6 +19,7 @@ WORKDIR /app
2119COPY --from=build /app/dist /app/dist
2220COPY --from=build /app/package.json /app/package.json
2321
22+ # Exclude devDependencies
2423RUN npm install --only=production
2524
2625ENV DEBUG=* NPM_CONFIG_LOGLEVEL=verbose
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y chromium
1616# Set the CHROME_BIN environment variable
1717ENV CHROME_BIN=/usr/bin/chromium
1818
19- RUN npm run build --prod
19+ RUN npm run build:dev
2020
2121EXPOSE 4200
2222
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ server {
77 try_files $uri $uri / /index .html;
88 }
99
10- location /api/v0/ {
11- proxy_pass http ://api.dev.interviewprep.onyxdevtutorials.com:3000 /;
12- proxy_set_header Host $host ;
13- proxy_set_header X-Real-IP $remote_addr ;
14- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
15- proxy_set_header X-Forwarded-Proto $scheme ;
16- }
10+ # location /api/v0/ {
11+ # proxy_pass http://api.dev.interviewprep.onyxdevtutorials.com:3000/;
12+ # proxy_set_header Host $host;
13+ # proxy_set_header X-Real-IP $remote_addr;
14+ # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
15+ # proxy_set_header X-Forwarded-Proto $scheme;
16+ # }
1717
1818 error_page 500 502 503 504 /50x .html;
1919 location = /50x .html {
Original file line number Diff line number Diff line change 33 "version" : " 0.0.0" ,
44 "scripts" : {
55 "ng" : " ng" ,
6- "start" : " ng serve --host 0.0.0.0 --port 4200" ,
7- "build" : " ng build --configuration production" ,
6+ "start" : " ng serve --host 0.0.0.0 --port 4200 --configuration local" ,
7+ "build:prod" : " ng build --configuration production" ,
8+ "build:dev" : " ng build --configuration development" ,
9+ "build:local" : " ng build --configuration local" ,
810 "watch" : " ng build --watch --configuration local" ,
911 "test" : " ng test --no-watch" ,
1012 "test:watch" : " ng test"
You can’t perform that action at this time.
0 commit comments