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 70
70
working-directory : ./backend
71
71
run : npm install
72
72
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
-
79
73
- name : Run backend tests
80
74
working-directory : ./backend
81
75
env :
@@ -103,12 +97,6 @@ jobs:
103
97
with :
104
98
node-version : ' 22'
105
99
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
-
112
100
- name : Configure AWS credentials
113
101
uses : aws-actions/configure-aws-credentials@v1
114
102
with :
@@ -130,11 +118,6 @@ jobs:
130
118
--zip-file fileb://backend/migrate-lambda/migrate-package.zip \
131
119
--region ${{ env.AWS_REGION }}
132
120
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
-
138
121
- name : Wait for Lambda update
139
122
run : |
140
123
max_attempts=100
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ COPY frontend /app/frontend
12
12
13
13
RUN npm install -g @angular/cli
14
14
15
- RUN npm run build --prod
15
+ RUN npm run build:dev
16
16
17
17
# Stage 2: Prepare to serve the Angular application with Nginx
18
18
FROM nginx:alpine AS nginx
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ RUN npm install
9
9
10
10
COPY . .
11
11
12
- # WORKDIR /app/backend
13
-
14
12
RUN npm run build
15
13
16
14
# Stage 2: Prepare to serve the application
@@ -21,6 +19,7 @@ WORKDIR /app
21
19
COPY --from=build /app/dist /app/dist
22
20
COPY --from=build /app/package.json /app/package.json
23
21
22
+ # Exclude devDependencies
24
23
RUN npm install --only=production
25
24
26
25
ENV 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
16
16
# Set the CHROME_BIN environment variable
17
17
ENV CHROME_BIN=/usr/bin/chromium
18
18
19
- RUN npm run build --prod
19
+ RUN npm run build:dev
20
20
21
21
EXPOSE 4200
22
22
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ server {
7
7
try_files $uri $uri / /index.html;
8
8
}
9
9
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
+ # }
17
17
18
18
error_page 500 502 503 504 /50x.html;
19
19
location = /50x.html {
Original file line number Diff line number Diff line change 3
3
"version" : " 0.0.0" ,
4
4
"scripts" : {
5
5
"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" ,
8
10
"watch" : " ng build --watch --configuration local" ,
9
11
"test" : " ng test --no-watch" ,
10
12
"test:watch" : " ng test"
You can’t perform that action at this time.
0 commit comments