Skip to content

Feature/migrate to deno #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 103 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
b6d0f3d
add test for HandleHTTPError
j4qfrost Aug 26, 2024
d123995
more verbose http codes
j4qfrost Aug 26, 2024
d56d930
Update Dockerfile
astrosnat Aug 26, 2024
47cb345
Update compose_dev.sh
astrosnat Aug 26, 2024
18e7b49
add failure condition test
j4qfrost Aug 26, 2024
c7690d1
Merge branch 'upstream/main'
j4qfrost Aug 27, 2024
de31424
Merge remote-tracking branch 'upstream/golang123'
j4qfrost Aug 27, 2024
3646abe
formatting and test standards
j4qfrost Aug 28, 2024
0a7fcf0
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 7, 2024
df26051
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 7, 2024
6cbb97c
add frontend file polling for wsl2
j4qfrost Sep 7, 2024
8f86e23
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 9, 2024
564ad6b
Add test for HandleHTTPError (#278)
j4qfrost Aug 28, 2024
88b4854
add failure condition test (#282)
j4qfrost Aug 29, 2024
a2ccc58
Creation of Market Price Projection API (#277)
pwdel Aug 30, 2024
a1e039c
Create SECURITY.md
pwdel Sep 4, 2024
17e26a5
Adding Fees to Buying and Selling Bets (#287)
pwdel Sep 7, 2024
327e906
Frontend fixes (#286)
markokovac16 Sep 7, 2024
f10fdde
Attempting toa ddress cors related security concern. (#298)
pwdel Sep 7, 2024
f1b4d43
Drafting out reporting stats.
pwdel Sep 7, 2024
4cc882e
Add support for dependency injection to setup (#301)
ajlacey Sep 8, 2024
29eaddf
Merge branch 'upstream/main'
j4qfrost Sep 9, 2024
9692361
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 12, 2024
61827a6
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 23, 2024
df4f062
revert
j4qfrost Sep 23, 2024
2da9247
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 26, 2024
f6fea8b
Fix/remove wsl check (#337)
j4qfrost Sep 23, 2024
f74ebd2
Feature/frontend vite build (#341)
j4qfrost Sep 25, 2024
454fa34
feat(ci): Add docker creation workflow
j4qfrost Sep 26, 2024
402bf2d
separate builds
j4qfrost Sep 26, 2024
7becd22
on branch up
j4qfrost Sep 27, 2024
31a03d5
main
j4qfrost Sep 27, 2024
95ecf5b
Merge branch 'feature/ci-container-build-publish'
j4qfrost Sep 27, 2024
4717a79
correct files
j4qfrost Sep 27, 2024
00857a6
remove syntax check
j4qfrost Sep 27, 2024
47896f6
fix metas
j4qfrost Sep 27, 2024
353d97d
meta access
j4qfrost Sep 27, 2024
0af2995
attestation
j4qfrost Sep 27, 2024
f3aeba1
separate attestations
j4qfrost Sep 27, 2024
c99fbbc
Merge branch 'openpredictionmarkets:main' into main
j4qfrost Sep 27, 2024
51c7a6a
latest tag
j4qfrost Sep 27, 2024
813e8c3
Merge branch 'main' of github.com:j4qfrost/socialpredict
j4qfrost Sep 27, 2024
7f822b1
tag change
j4qfrost Sep 27, 2024
4bd777c
caching
j4qfrost Sep 27, 2024
8ec1d21
buildx and tagging
j4qfrost Sep 27, 2024
1c37224
retag and test cache
j4qfrost Sep 27, 2024
d310deb
tagging
j4qfrost Sep 28, 2024
307a83d
automate on tags
j4qfrost Sep 28, 2024
87a41ef
added back for security
j4qfrost Sep 28, 2024
ae069c7
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Sep 29, 2024
686fcc9
feat(ci): Deploy workflow to staging
j4qfrost Oct 1, 2024
13c172c
up version
j4qfrost Oct 4, 2024
c308efb
fingerprint check
j4qfrost Oct 4, 2024
0870969
fingerprint remove
j4qfrost Oct 4, 2024
cb37945
fingerprint
j4qfrost Oct 4, 2024
cee47be
fingerprint
j4qfrost Oct 4, 2024
30ca530
version
j4qfrost Oct 4, 2024
544df4f
compose cmd
j4qfrost Oct 4, 2024
42e3a31
input file
j4qfrost Oct 4, 2024
d65dff4
go to source
j4qfrost Oct 4, 2024
0e28e3e
other dir
j4qfrost Oct 4, 2024
188b15f
other dir
j4qfrost Oct 4, 2024
b8a3451
other dir
j4qfrost Oct 4, 2024
d08981e
var names
j4qfrost Oct 4, 2024
1e16f7f
check
j4qfrost Oct 4, 2024
fd1a287
env file
j4qfrost Oct 5, 2024
bc03d33
env file
j4qfrost Oct 5, 2024
43722d5
env file
j4qfrost Oct 5, 2024
33dfec4
Merge branch 'main' into feature/ci_deploy_digital_ocean
j4qfrost Oct 5, 2024
31dea91
args
j4qfrost Oct 5, 2024
29d0c8d
Merge branch 'main' into feature/ci_deploy_digital_ocean
j4qfrost Oct 5, 2024
e2c3e0a
args
j4qfrost Oct 5, 2024
4e09693
Merge branch 'main' into feature/ci_deploy_digital_ocean
j4qfrost Oct 5, 2024
fe2aed9
args
j4qfrost Oct 5, 2024
06408f4
args
j4qfrost Oct 5, 2024
630d6dd
args
j4qfrost Oct 5, 2024
573ead7
args
j4qfrost Oct 5, 2024
8369107
check
j4qfrost Oct 5, 2024
b054a97
backend
j4qfrost Oct 5, 2024
575398f
backend
j4qfrost Oct 5, 2024
ffc284b
docker login
j4qfrost Oct 5, 2024
82a1481
args
j4qfrost Oct 5, 2024
cf543b4
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict
j4qfrost Nov 4, 2024
ffe7f11
fix(ci): Staging workflow not setting domain correctly
j4qfrost Nov 4, 2024
6c3a50d
refactor(nginx): Whitelist paths
j4qfrost Nov 4, 2024
4043fec
Merge branch 'fix/staging-workflow-domain'
j4qfrost Nov 4, 2024
0443459
Bump the npm_and_yarn group across 1 directory with 4 updates
dependabot[bot] Nov 6, 2024
6519785
Merge branch 'main' into fix/npm_yarn_updates
astrosnat Nov 9, 2024
77f8370
Merge branch 'main' into fix/npm_yarn_updates
j4qfrost Nov 9, 2024
9b89ab2
modify for deno
j4qfrost Nov 23, 2024
687f86c
Merge pull request #2 from j4qfrost/feature/migrate_to_deno
j4qfrost Nov 23, 2024
08e49d1
allow forks to deploy
j4qfrost Nov 23, 2024
23c949a
allow forks to deploy (#3)
j4qfrost Nov 23, 2024
c84b7ca
fix up CI and nginx conf on deploy machine
j4qfrost Nov 23, 2024
9abb28c
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict…
j4qfrost Nov 26, 2024
30ed1d0
whoops
j4qfrost Nov 26, 2024
d8695b7
Merge branch 'main' of github.com:openpredictionmarkets/socialpredict…
j4qfrost Nov 29, 2024
1c3ee23
update lock
j4qfrost Nov 29, 2024
939ab4a
Update Dockerfile
j4qfrost Dec 2, 2024
3a3bc5e
correct dev dockerfile
j4qfrost Dec 2, 2024
e153699
easier to use
j4qfrost Dec 2, 2024
79843d6
udpate react-charts
j4qfrost Dec 29, 2024
20f7588
Merge branch 'main' into feature/migrate_to_deno
j4qfrost Dec 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
cd socialpredict-deploy
else
cd socialpredict-deploy
git fetch origin
git remote add ${{ github.repository_owner }} ${{ github.server_url }}/${{ github.repository }}
git fetch ${{ github.repository_owner }}
fi
template="./frontend/src/config.js.template"
file="./frontend/src/config.js"
Expand All @@ -51,7 +52,7 @@ jobs:
uses: treosh/lighthouse-ci-action@v12
with:
urls: |
https://openprediction.xyz/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to figure this out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was messing me up when testing.

https://brierfoxforecast.com/
budgetPath: ./scripts/lighthouse # test performance budgets
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
18 changes: 13 additions & 5 deletions data/nginx/vhosts/prod/app.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@ server {
}
}

proxy_cache_path /data/nginx/cache keys_zone=cache_zone:10m;
map $request_method $purge_method {
PURGE 1;
default 0;
}

server {
gzip on;
gzip_min_length 1000;
gunzip on;
gunzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
listen 443 quic reuseport;
listen 443 ssl;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
http2 on;
http3 on;
http3_hq on;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some browser optimizations, need to recompile a custom version of nginx to leverage caching.

server_name ${DOMAIN};

ssl_certificate /etc/letsencrypt/live/${DOMAIN}/fullchain.pem;
Expand All @@ -25,11 +36,8 @@ server {
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

location /api/ {
proxy_pass http://backend:8080/;
}

location / {
proxy_pass http://frontend:80;
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for http3

}
}
8 changes: 4 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# syntax=docker/dockerfile:1.3-labs
FROM node:22.4.0
FROM denoland/deno:debian

WORKDIR /app

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

EXPOSE 5173
CMD ["npm", "run", "start"]
CMD ["deno", "run", "start"]
8 changes: 4 additions & 4 deletions frontend/Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# syntax=docker/dockerfile:1.3-labs
FROM node:21.0.0 AS builder
FROM denoland/deno:alpine AS builder

WORKDIR /app

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

RUN npm run build
RUN deno run build

FROM nginx:latest

Expand Down
Loading
Loading