Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
fa8b945
Makefile Improvements (#1937)
ballPointPenguin Mar 6, 2025
33f67bd
Development Data Seeds via Cypress (#1938)
ballPointPenguin Mar 6, 2025
85c259a
default server logging to 'warn' (#1939)
ballPointPenguin Mar 6, 2025
cb11f9d
typecheck on morepids
tevko Mar 7, 2025
90bcb43
Merge pull request #1953 from compdemocracy/te-patch-morePIDs-fix
tevko Mar 7, 2025
685facf
begin cdk setup
tevko Feb 14, 2025
3a5c3bb
begin setting up arch
tevko Feb 14, 2025
6cf3d7e
store notes in readme for now
tevko Feb 14, 2025
6ce05f0
configure db
tevko Feb 14, 2025
9663452
remove comment
tevko Feb 14, 2025
e10d0d9
encorporate external branch changes
tevko Feb 18, 2025
b534393
final config
tevko Feb 18, 2025
e2c6264
use yum instead of dnf
tevko Feb 19, 2025
43751d0
pubsub
tevko Feb 19, 2025
fc37d19
add customResource for asg versioning
tevko Feb 19, 2025
8435db3
correct custom resource dependencies
tevko Feb 19, 2025
a548f31
switch to docker compose
tevko Feb 19, 2025
66db80c
new db secret strategy
tevko Feb 19, 2025
dc0f599
deployment config added
tevko Feb 20, 2025
c3d321b
add scripts and appspec
tevko Feb 20, 2025
2fcd030
remove cloudwatch for now
tevko Feb 20, 2025
cc50a70
ecr prep
tevko Feb 20, 2025
5eff444
update db secrets
tevko Feb 20, 2025
c1b0e67
minor config fixes
tevko Feb 21, 2025
6b9d2d3
updates for db connection
tevko Feb 21, 2025
424f383
modify healthcheck url
tevko Feb 21, 2025
93a03ea
test deploy workflow
tevko Feb 21, 2025
f00fb6f
add docker-compose
tevko Feb 21, 2025
17e3da8
alt compose install
tevko Feb 21, 2025
3d7be62
add env step
tevko Feb 21, 2025
47683a6
pass vars differently for docker pull
tevko Feb 21, 2025
7c2e02f
revert to latest tag
tevko Feb 21, 2025
fe7c5ed
log config
tevko Feb 23, 2025
02482cf
update db instance
tevko Feb 23, 2025
e57c1b0
start nginx with server
tevko Feb 23, 2025
424c26e
add subdomain config
tevko Feb 24, 2025
abd59af
manual dns validation
tevko Feb 24, 2025
353ab3b
more dns config
tevko Feb 24, 2025
ed5039e
final domain config
tevko Feb 25, 2025
d01ab73
env var config
tevko Feb 26, 2025
b51ca0d
secrets conf
tevko Feb 26, 2025
2c8a866
update jq logic
tevko Feb 26, 2025
fe924a4
add debugging lines
tevko Feb 26, 2025
ca19689
reorder user script
tevko Feb 26, 2025
aee155b
update bash script to add env vars at end
tevko Feb 26, 2025
9749213
try appending entire env
tevko Feb 26, 2025
2013512
update .env strategy
tevko Feb 26, 2025
24f807a
final env simplification strategy
tevko Feb 26, 2025
59b1492
va fixes
tevko Feb 26, 2025
ac6673f
fix aws command
tevko Feb 26, 2025
96b202e
debug port 443 conflict
tevko Feb 27, 2025
3079d98
fix before_install
tevko Feb 27, 2025
ed7fb9b
debug after install
tevko Feb 27, 2025
3fa3343
stop before start
tevko Feb 27, 2025
23fdbfa
more after install fixes
tevko Feb 27, 2025
5ef5431
temp disable redirect middleware
tevko Feb 27, 2025
3196086
add use network host
tevko Feb 27, 2025
bef6396
add network host in more places
tevko Feb 28, 2025
d8634d9
add network host
tevko Feb 28, 2025
ce93fae
add again
tevko Feb 28, 2025
14604ce
add one more place
tevko Feb 28, 2025
6201e3e
try new method
tevko Feb 28, 2025
cf6b542
update
tevko Feb 28, 2025
9a14f1d
debug logging
tevko Feb 28, 2025
1c8a137
last try
tevko Feb 28, 2025
a668361
try brute force
tevko Feb 28, 2025
3e6eb18
more debug
tevko Feb 28, 2025
447c9a6
more debug 2
tevko Feb 28, 2025
a87c9e2
testing
tevko Feb 28, 2025
1ac6668
change trust proxy
tevko Feb 28, 2025
22aacd3
set to true temp
tevko Feb 28, 2025
4eb798d
follow up on proxy
tevko Feb 28, 2025
2bbe747
force build and recreate
tevko Feb 28, 2025
b4fcce1
flip dev mode back off
tevko Feb 28, 2025
8c2f3af
target redir
tevko Feb 28, 2025
3c03f6e
set trust proxy to responsible value
tevko Feb 28, 2025
2685fe4
fix docker en
tevko Feb 28, 2025
aea5ee4
increase timeout duration for streaming responses
tevko Mar 2, 2025
ee63be4
remove echo
tevko Mar 4, 2025
397017b
attempt node image upgrade
tevko Mar 4, 2025
4f169e1
different node upgrade strategy
tevko Mar 4, 2025
bd719e9
explicitly install openssl and deps
tevko Mar 4, 2025
03e039f
upgrade translate api
tevko Mar 5, 2025
d84668f
docker pruin and size updates
tevko Mar 5, 2025
58d5b5a
fix instnace state
tevko Mar 5, 2025
3c2e070
debug logging
tevko Mar 6, 2025
085c4f8
try replace newline
tevko Mar 6, 2025
f3852b0
try diff newline replacement
tevko Mar 6, 2025
7be2f1f
use base64 instead
tevko Mar 6, 2025
a5138b5
add readme and refine alarms, notifications, and autoscaling
tevko Mar 7, 2025
f2941c5
lower math worker alarm min cpu threshold
tevko Mar 7, 2025
0fe8a04
drop threshold even lower
tevko Mar 7, 2025
3dc5492
more alarm adjustments
tevko Mar 10, 2025
5308866
force pull
tevko Mar 10, 2025
d4207e1
git config in ec2 setup
tevko Mar 10, 2025
11a6ba8
hardcode report cache and remove env var example
tevko Mar 11, 2025
37f060e
remove deployment in alarm
tevko Mar 11, 2025
6796cba
turn off autorollback
tevko Mar 11, 2025
a6f414e
attempt promisify topics
tevko Mar 11, 2025
3e7f01f
rework async streaming
tevko Mar 12, 2025
ba018f1
remove alarms
tevko Mar 12, 2025
ba7c31a
debug logging
tevko Mar 12, 2025
910b415
more debug
tevko Mar 12, 2025
b62e3e9
change cache strategy
tevko Mar 12, 2025
f0186d9
change job to manual run
tevko Mar 12, 2025
b0c2152
error checking
tevko Mar 13, 2025
7bf9ecc
Merge pull request #1927 from compdemocracy/te-cdk-replatform
tevko Mar 13, 2025
adaa3e5
switch branch to edge
tevko Mar 13, 2025
4d3cec6
Merge pull request #1957 from compdemocracy/te-aws-preprod
tevko Mar 13, 2025
152a6f8
Merge pull request #1951 from compdemocracy/te-tos-update
tevko Mar 14, 2025
b2d5b82
upgrade math instance memory
tevko Mar 14, 2025
a5335b0
change math to c5a image
tevko Mar 14, 2025
8f27803
Merge pull request #1959 from compdemocracy/te-math-aws-upgrade
tevko Mar 14, 2025
bffa2de
allow all to read from ecr
tevko Mar 15, 2025
dff835d
cutoff for large-convo processing if > 5000 comments (#1961)
ballPointPenguin Mar 15, 2025
fd440c3
Fix and update the E2E build (#1963)
ballPointPenguin Mar 16, 2025
1681d6e
Add local DynamoDB support and update configuration
ballPointPenguin Feb 22, 2025
2fff0fe
remove unused dev dependency
ballPointPenguin Mar 6, 2025
fb30689
upgrade math image
tevko Mar 17, 2025
fc94842
Merge pull request #1940 from compdemocracy/br/local-dynamodb-dev
tevko Mar 17, 2025
4228db3
Client-Admin updates and cleanup (#1966)
ballPointPenguin Mar 17, 2025
c650808
Merge pull request #1962 from compdemocracy/te-ecr-access
tevko Mar 17, 2025
2172e1f
Merge pull request #1968 from compdemocracy/te-aws-math-upgrade-2
tevko Mar 17, 2025
f6cb612
prepare for deploy
tevko Mar 18, 2025
bc1545a
xid report via uuid (#1964)
ballPointPenguin Mar 19, 2025
6122b72
Update linting in `server` and `client-report` (#1969)
ballPointPenguin Mar 19, 2025
4d49734
Merge pull request #1970 from compdemocracy/te-aws-golive
tevko Mar 20, 2025
3e6c84a
allow cdk resources to upload to s3 (#1972)
tevko Mar 20, 2025
b66210d
upsert on conflict for `translateAndStoreComment` (#1985)
ballPointPenguin Apr 2, 2025
1e1baa2
Merge branch 'stable' into edge
tevko Apr 2, 2025
6b9bb92
add desired capacity
tevko Apr 3, 2025
61b8a18
Added a space between 'vote' and 'on' on the participantHelpWelcomeTe…
geocontrol Apr 10, 2025
8af521c
fully remove facebook & twitter (#1974)
ballPointPenguin Apr 22, 2025
8221181
add simple analytics (#1992)
tevko Apr 22, 2025
0e42f7a
Bump aws-cdk-lib from 2.178.2 to 2.189.1 in /cdk (#1990)
dependabot[bot] Apr 22, 2025
c0b52a7
Bump http-proxy-middleware from 2.0.7 to 2.0.9 in /client-report (#1995)
dependabot[bot] Apr 22, 2025
5a4c867
Bump @babel/helpers from 7.20.13 to 7.26.10 in /server (#1967)
dependabot[bot] Apr 22, 2025
4f6bc3c
fix embed.js function call (#1998)
ballPointPenguin Apr 23, 2025
7e40756
upgrade victorycharts make bad console message disappear (#2006)
tevko May 1, 2025
03b0959
remove heroku concerns from deploy scripts (#2010)
ballPointPenguin May 2, 2025
0fd6729
clean up gh actions a bit (#2011)
ballPointPenguin May 2, 2025
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
29 changes: 3 additions & 26 deletions .github/workflows/deploy-preprod.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,20 @@
name: Deploy Preprod
name: Deploy Preprod Assets

on:
push:
branches:
- edge

jobs:
deploy-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Heroku CLI
run: |
curl https://cli-assets.heroku.com/install.sh | sh

- name: Login to Heroku
uses: akhileshns/heroku-deploy@v3.13.15
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "polis-preprod"
heroku_email: ${{secrets.HEROKU_EMAIL}}
branch: "edge"

- name: Deploy to Heroku
run: |
git push https://heroku:${{secrets.HEROKU_API_KEY}}@git.heroku.com/polis-preprod.git edge:main

deploy-static:
runs-on: ubuntu-latest
needs: deploy-backend
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -51,7 +29,6 @@ jobs:
- name: Build static assets
env:
EMBED_SERVICE_HOSTNAME: preprod.pol.is
ENABLE_TWITTER_WIDGETS: true
GA_TRACKING_ID: G-WVP78N35QR
SERVICE_URL: https://preprod.pol.is
run: |
Expand Down
30 changes: 3 additions & 27 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,21 @@
name: Deploy Prod
name: Deploy Prod Assets

on:
push:
branches:
- stable

jobs:
deploy-backend:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Heroku CLI
run: |
curl https://cli-assets.heroku.com/install.sh | sh

- name: Login to Heroku
uses: akhileshns/heroku-deploy@v3.13.15
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "polisapp"
heroku_email: ${{secrets.HEROKU_EMAIL}}
branch: "stable"

- name: Deploy to Heroku
run: |
git push https://heroku:${{secrets.HEROKU_API_KEY}}@git.heroku.com/polisapp.git stable:main

deploy-static:
runs-on: ubuntu-latest
needs: deploy-backend
environment: production
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -53,7 +30,6 @@ jobs:
- name: Build static assets
env:
EMBED_SERVICE_HOSTNAME: pol.is
ENABLE_TWITTER_WIDGETS: true
GA_TRACKING_ID: G-WVP78N35QR
SERVICE_URL: https://pol.is
run: |
Expand Down
7 changes: 7 additions & 0 deletions cdk/lib/cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ export class CdkStack extends cdk.Stack {
],
});

instanceRole.addToPolicy(new iam.PolicyStatement({
actions: ['s3:PutObject', 's3:PutObjectAcl', 's3:AbortMultipartUpload'],
resources: ['arn:aws:s3:::*', 'arn:aws:s3:::*/*'],
}));

// IAM Role for CodeDeploy
const codeDeployRole = new iam.Role(this, 'CodeDeployRole', {
assumedBy: new iam.ServicePrincipal('codedeploy.amazonaws.com'),
Expand Down Expand Up @@ -281,6 +286,7 @@ EOF`,
launchTemplate: webLaunchTemplate,
minCapacity: 2,
maxCapacity: 10,
desiredCapacity: 2,
vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC },
healthCheck: autoscaling.HealthCheck.elb({grace: cdk.Duration.minutes(5)})
});
Expand All @@ -289,6 +295,7 @@ EOF`,
vpc,
launchTemplate: mathWorkerLaunchTemplate,
minCapacity: 1,
desiredCapacity: 1,
maxCapacity: 5,
vpcSubnets: {
subnetType: ec2.SubnetType.PUBLIC,
Expand Down
49 changes: 25 additions & 24 deletions cdk/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"typescript": "~5.6.3"
},
"dependencies": {
"aws-cdk-lib": "2.178.2",
"aws-cdk-lib": "2.189.1",
"constructs": "^10.0.0"
}
}
Loading
Loading