Skip to content
This repository was archived by the owner on Oct 3, 2025. It is now read-only.

Commit 7e7e9c8

Browse files
authored
Remix: remove backend app to simplify. (#262)
* Remix: remove backend app to simplify. * Update tests. * Fix local dev + overrides. * bump node. * Updates. * Rebuild. * Remove location. * Tweaks. * Fix new testing endpoint. * Remove backend resource:set calls, since DNE. * Update frontend disk. * Update frontend disk.
1 parent 242d7dd commit 7e7e9c8

File tree

28 files changed

+1653
-2352
lines changed

28 files changed

+1653
-2352
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/test.yaml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ jobs:
1818
matrix:
1919
# These versions match Upsun support
2020
# Node.js: https://docs.upsun.com/languages/nodejs.html#supported-versions
21-
node-version: [18.x, 20.x, 21.x]
22-
# Python: https://docs.upsun.com/languages/python.html#supported-versions
23-
python-version: ['3.9', '3.10', '3.11', '3.12']
24-
21+
node-version: [18.x, 20.x, 22.x]
22+
2523
steps:
2624
################################################################################################
2725
# A. Setup workflow.
@@ -33,41 +31,26 @@ jobs:
3331
uses: actions/setup-node@v3
3432
with:
3533
node-version: ${{ matrix.node-version }}
36-
- name: "3. Python."
37-
uses: actions/setup-python@v4
38-
with:
39-
python-version: ${{ matrix.python-version }}
40-
cache: 'pip'
4134

4235
################################################################################################
4336
# B. Prettify, lint, and test repo.
44-
- name: "4. Preparing"
37+
- name: "3. Preparing"
4538
run: |
4639
echo "::notice::Running react-scripts tests."
4740
export CI=true
4841
npm install cross-env npm-run-all -g
4942
npm install
50-
- name: "5. Verifying backend code is pretty"
51-
run: |
52-
npm run prettier:backend
53-
- name: "6. Verifying frontend code is pretty"
43+
- name: "4. Verifying frontend code is pretty"
5444
run: |
5545
npm run prettier:frontend
56-
- name: "7. Linting frontend"
46+
- name: "5. Linting frontend"
5747
run: npm run lint:frontend
58-
- name: "8. Run Frontend tests"
48+
- name: "6. Run Frontend tests"
5949
run: npm run test:frontend
60-
- name: "9. Run Backend linting"
61-
run: |
62-
npm run lint:backend
6350

6451
################################################################################################
6552
# C. Ensure no vulnerabilities.
66-
- name: "10. Test: there should be no Python vulnerabilities."
67-
run: |
68-
echo "::notice::Checking for vulnerabilities in backend Python app dependencies."
69-
npm run test:backend
70-
- name: "11. Test: there should be no HIGH Node.js vulnerabilities."
53+
- name: "7. Test: there should be no HIGH Node.js vulnerabilities."
7154
run: |
7255
echo "::notice::Checking for high vulnerabilities in frontend Node.js app dependencies."
7356
cd frontend
@@ -81,7 +64,7 @@ jobs:
8164
else
8265
echo "::notice::No HIGH vulnerabilities found on frontend app."
8366
fi
84-
- name: "12. Test: there should be no CRITICAL Node.js vulnerabilities."
67+
- name: "8. Test: there should be no CRITICAL Node.js vulnerabilities."
8568
run: |
8669
echo "::notice::Checking for critical vulnerabilities in frontend Node.js app dependencies."
8770
cd frontend

.upsun/config.yaml

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ applications:
2323
npm install
2424
export REACT_APP_PROJECT_ID=$PLATFORM_PROJECT
2525
npm run build
26-
27-
relationships:
28-
api:
29-
service: "backend"
30-
endpoint: "http"
26+
deploy: |
27+
bash scripts/api.sh
3128
3229
web:
3330
locations:
@@ -42,27 +39,10 @@ applications:
4239
static\/*:
4340
expires: 365d
4441

45-
# App 2: Backend (Python)
46-
backend:
47-
48-
source:
49-
root: "backend"
50-
51-
type: "python:3.12"
52-
53-
hooks:
54-
build: |
55-
set -eux
56-
pip install -r requirements.txt --disable-pip-version-check
57-
58-
web:
59-
commands:
60-
start: "gunicorn main:app"
61-
upstream:
62-
socket_family: tcp
63-
locations:
64-
/:
65-
passthru: true
42+
mounts:
43+
/build/api/v1/environment:
44+
source: storage
45+
source_path: api
6646

6747
# #add_service_start
6848
# ######################################################################################################################
@@ -78,7 +58,7 @@ applications:
7858
# type: "redis:7.0"
7959
# ######################################################################################################################
8060
# #add_service_end
81-
61+
8262
# Routes configuration.
8363
routes:
8464
"https://{default}/":
@@ -91,8 +71,3 @@ routes:
9171
id: frontend-redirect
9272
type: redirect
9373
to: "https://{default}/"
94-
95-
"https://{default}/api/":
96-
id: backend
97-
type: upstream
98-
upstream: "backend:http"

backend/.env.sample

Lines changed: 0 additions & 22 deletions
This file was deleted.

backend/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

backend/app/routes.py

Lines changed: 0 additions & 66 deletions
This file was deleted.

backend/main.py

Lines changed: 0 additions & 55 deletions
This file was deleted.

backend/requirements.txt

Lines changed: 0 additions & 44 deletions
This file was deleted.

backend/scripts/build.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

backend/scripts/clean.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)