Skip to content

Commit 25a81c6

Browse files
committed
Clean up and clarification (I hope)
1 parent 357d20d commit 25a81c6

File tree

6 files changed

+14
-30
lines changed

6 files changed

+14
-30
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ jobs:
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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ COPY frontend /app/frontend
1212

1313
RUN 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
1818
FROM nginx:alpine AS nginx

backend/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ RUN npm install
99

1010
COPY . .
1111

12-
# WORKDIR /app/backend
13-
1412
RUN npm run build
1513

1614
# Stage 2: Prepare to serve the application
@@ -21,6 +19,7 @@ WORKDIR /app
2119
COPY --from=build /app/dist /app/dist
2220
COPY --from=build /app/package.json /app/package.json
2321

22+
# Exclude devDependencies
2423
RUN npm install --only=production
2524

2625
ENV DEBUG=* NPM_CONFIG_LOGLEVEL=verbose

frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y chromium
1616
# Set the CHROME_BIN environment variable
1717
ENV CHROME_BIN=/usr/bin/chromium
1818

19-
RUN npm run build --prod
19+
RUN npm run build:dev
2020

2121
EXPOSE 4200
2222

frontend/nginx.conf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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 {

frontend/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
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"

0 commit comments

Comments
 (0)