Skip to content

Commit e4b043e

Browse files
committed
feat: bumb patronx to 2.0.0 for aws asset store integration.
1 parent b4780c9 commit e4b043e

7 files changed

Lines changed: 25 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ _Cloud‑native survey engine with end‑to‑end observability._
2323
- **Data Layer** PostgreSQL, Flyway to versioned schema migrations
2424
- **Periodic backups & Database Recovery** with [PatronX](https://github.com/xdanielsb/patronx)
2525
- **List backups** `make list-backups` via PatronX
26+
- **Remote asset store** | Upload backups to S3 using PatronX
2627
- **Instrumentation**| Sentry frontend, backend, analytics, sentry (error tracking)
2728
- **Payment**| Stripe (credit purchase flow)
2829
- **Invoice PDF** | Invoice generation for payments

docs/data-recovery.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This document describes the steps to restore the production database using the e
77
- Docker and Docker Compose installed
88
- Access to the backups folder generated by PatronX
99
- A working `.env` file inside `infra/` with database credentials
10+
- Optional AWS credentials configured if using S3 offloading
1011

1112
## Recovery Steps
1213

infra/.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ GOOGLE_CLIENT_SECRET_STAGING=
3737
GOOGLE_CLIENT_ID_PROD=
3838
GOOGLE_CLIENT_SECRET_PROD=
3939
INVOICE_STORAGE_PATH=
40+
S3_BUCKET=
41+
AWS_ACCESS_KEY_ID=
42+
AWS_SECRET_ACCESS_KEY=
43+
AWS_DEFAULT_REGION=

infra/.env.patronx.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ PGDATABASE=survey
88
# Backup settings
99
BACKUP_DIR=./backups
1010
S3_BUCKET=
11+
AWS_ACCESS_KEY_ID=
12+
AWS_SECRET_ACCESS_KEY=
13+
AWS_DEFAULT_REGION=
1114

1215
# Cron schedules
1316
BACKUP_CRON=0 0 * * *
1417
CLEANUP_CRON=0 1 * * *
1518

1619
# Retention policy
1720
RETENTION_DAYS=30
21+
S3_BUCKET=bucket-name

infra/docker-compose.dev.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ services:
5757
- "15672:15672"
5858

5959
patronx-worker:
60-
image: xdanielsb/patronx:1.2.0
60+
image: xdanielsb/patronx:2.0.0
6161
entrypoint: ["remoulade"]
6262
command: ["patronx.tasks"]
6363
restart: unless-stopped
@@ -69,6 +69,10 @@ services:
6969
PGUSER: ${POSTGRES_USER}
7070
PGPASSWORD: ${POSTGRES_PASSWORD}
7171
BACKUP_DIR: '/app/backups'
72+
S3_BUCKET: ${S3_BUCKET}
73+
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
74+
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
75+
AWS_DEFAULT_REGION: ${AWS_REGION}
7276
volumes:
7377
- ../backups:/app/backups
7478
depends_on:

infra/docker-compose.keycloak.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ services:
3333
restart: unless-stopped
3434

3535
patronx-worker:
36-
image: xdanielsb/patronx:1.2.0
36+
image: xdanielsb/patronx:2.0.0
3737
entrypoint: ["remoulade"]
3838
command: ["patronx.tasks"]
3939
restart: unless-stopped
@@ -45,6 +45,10 @@ services:
4545
PGUSER: ${POSTGRES_USER}
4646
PGPASSWORD: ${POSTGRES_PASSWORD}
4747
BACKUP_DIR: /backups
48+
S3_BUCKET: ${S3_BUCKET}
49+
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
50+
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
51+
AWS_DEFAULT_REGION: ${AWS_REGION}
4852
volumes:
4953
- ../backups:/backups
5054
depends_on:

infra/docker-compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ services:
131131
restart: unless-stopped
132132

133133
patronx-worker:
134-
image: xdanielsb/patronx:1.2.0
134+
image: xdanielsb/patronx:2.0.0
135135
entrypoint: ["remoulade"]
136136
command: ["patronx.tasks"]
137137
restart: unless-stopped
@@ -143,6 +143,10 @@ services:
143143
PGUSER: ${POSTGRES_USER}
144144
PGPASSWORD: ${POSTGRES_PASSWORD}
145145
BACKUP_DIR: /backups
146+
S3_BUCKET: ${S3_BUCKET}
147+
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
148+
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
149+
AWS_DEFAULT_REGION: ${AWS_REGION}
146150
volumes:
147151
- ../backups:/backups
148152
depends_on:

0 commit comments

Comments
 (0)