Skip to content

Commit

Permalink
Feature/frontend vite build (#341)
Browse files Browse the repository at this point in the history
* add test for HandleHTTPError

undelete

* more verbose http codes

* Update Dockerfile

Now using go 1.23! Tested this on dev, it works

* Update compose_dev.sh

Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt

* add failure condition test

* formatting and test standards

* add frontend file polling for wsl2

* Add test for HandleHTTPError (#278)

* add test for HandleHTTPError

undelete

* more verbose http codes

* Update Dockerfile

Now using go 1.23! Tested this on dev, it works

* Update compose_dev.sh

Prints initial settings as defined in setup.yaml. Added for usability reasons - users keep getting confused about account balance and maximum allowable debt

* add failure condition test

* formatting and test standards

---------

Co-authored-by: Osnat Katz Moon <[email protected]>

* add failure condition test (#282)

* Creation of Market Price Projection API (#277)

* Moving test to appropriate location.

* Updating, including moving test location. Test not passing due to precision error but generally passing on the terminal up to 6 dits.

* market projection handler, not working.

* Update market projected probability.

* Safe uint conversion.

* Updating, adding noop change to push into pipeline.

* Update, test passing.

* Update, attempting to solve type converstion uint problem.

* Adding projected market layout.

* Update, still have react JSON parse error but layout added to buyshares.

* Market projection updates on buy shares side, upon button press.

* Update, change printf to print.

* Create SECURITY.md

* Adding Fees to Buying and Selling Bets (#287)

* Drafting out fees deduction functions and capability.

* Attempting working version of initialBetFee function.

* Draft adding fees.

* Update, adding tests.

* Adding working test for GetBetsForMarket

* Successful fee util test.

* Fees added on backend, tests passing.

* Updating such that user record submitted. However fee summing not working yet evidently.

* Working fees, at least initial fees.

* Updating test scenario passing, made more clear.

* Update Dockerfile

We need to switch to 3.0.14-1~deb12u2

* Removing logging.

* Adding fees, including communicating fees on front end.

* totalBetCount to userBetCount so as not to misconstrue meaning.

* Simplifying function, test passed.

* Simplifying naming.

* Updating new function name in test

* Changing test to got before want convention.

* Update marketid variable

* Add combined fee structure for more througough test.

* Reverting sale amount to 1 share.

* Reversing got want

---------

Co-authored-by: Osnat Katz Moon <[email protected]>

* Frontend fixes (#286)

* fix: fixed the market buttons not showing on mobile

* fix: removed trade button on closed market

---------

Co-authored-by: Patrick Delaney <[email protected]>

* Attempting toa ddress cors related security concern. (#298)

* Drafting out reporting stats.

* Add support for dependency injection to setup (#301)

* Make EconomicsConfig from component structs

Auto initialize config
Add support to inject config
Add support for testing the setup through test doubles
Use new fee for placing bets (EachBetFee)

* revert

* feat(frontend): Compiles frontend into single js file for performance

* forgot merge

---------

Co-authored-by: Osnat Katz Moon <[email protected]>
Co-authored-by: Patrick Delaney <[email protected]>
Co-authored-by: Marko Kovač <[email protected]>
Co-authored-by: Arthur <[email protected]>
  • Loading branch information
5 people authored Sep 25, 2024
1 parent a9095c2 commit a9918d6
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 40 deletions.
2 changes: 1 addition & 1 deletion data/nginx/ssl_vhosts/app.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ server {
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

location / {
proxy_pass http://127.0.0.1:5173/;
proxy_pass http://127.0.0.1:80/;
}
}
2 changes: 1 addition & 1 deletion data/nginx/vhosts/prod/app.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ server {
}

location / {
proxy_pass http://frontend:5173;
proxy_pass http://frontend:80;
}
}
16 changes: 16 additions & 0 deletions frontend/Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1.3-labs
FROM node:21.0.0 AS builder

WORKDIR /app

COPY package.json package-lock.json ./
RUN npm install
COPY . .

RUN npm run build

FROM nginx:latest

COPY --from=builder /app/build /usr/share/nginx/html

CMD ["nginx", "-g", "daemon off;"]
Loading

0 comments on commit a9918d6

Please sign in to comment.