From 923ef9aed5fbf03790037c1993cccde1a3070944 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Sun, 4 Jan 2026 22:04:55 +0200 Subject: [PATCH] Update env for aws --- .env.example | 16 +++++++++------- backend/.env.example | 16 +++++++++------- backend/docker-compose.yaml | 1 + docker-compose.yaml | 1 + 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.env.example b/.env.example index 16ec552..86efd7e 100644 --- a/.env.example +++ b/.env.example @@ -2,9 +2,8 @@ DB_USER=recipes_user DB_PASSWORD=your_secure_password_here DB_NAME=recipes_db -DB_HOST=your-rds-endpoint.region.rds.amazonaws.com +DB_HOST=your-rds-endpoint.us-east-1.rds.amazonaws.com DB_PORT=5432 -DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} # Email Configuration SMTP_HOST=smtp.gmail.com @@ -26,13 +25,16 @@ AZURE_TENANT_ID=consumers AZURE_REDIRECT_URI=https://your-domain.com/auth/azure/callback # Cloudflare R2 Backup Configuration -R2_ENDPOINT=https://your-account-id.r2.cloudflarestorage.com -R2_ACCESS_KEY=your-r2-access-key -R2_SECRET_KEY=your-r2-secret-key +# Get these from your Cloudflare dashboard -> R2 -> Manage R2 API Tokens +R2_ENDPOINT=https://.r2.cloudflarestorage.com +R2_ACCESS_KEY=your-r2-access-key-id +R2_SECRET_KEY=your-r2-secret-access-key +R2_BUCKET_NAME=recipes-backups # Automatic Backup Schedule # Options: test (every 1 minute), daily, weekly, disabled BACKUP_INTERVAL=weekly -# Frontend API URL (for frontend container) -VITE_API_URL=https://your-domain.com +# Frontend API URL (for frontend container to connect to backend via docker-compose) +# Use the service name 'backend' from docker-compose.yaml +VITE_API_URL=http://backend:8000 diff --git a/backend/.env.example b/backend/.env.example index 16ec552..86efd7e 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -2,9 +2,8 @@ DB_USER=recipes_user DB_PASSWORD=your_secure_password_here DB_NAME=recipes_db -DB_HOST=your-rds-endpoint.region.rds.amazonaws.com +DB_HOST=your-rds-endpoint.us-east-1.rds.amazonaws.com DB_PORT=5432 -DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} # Email Configuration SMTP_HOST=smtp.gmail.com @@ -26,13 +25,16 @@ AZURE_TENANT_ID=consumers AZURE_REDIRECT_URI=https://your-domain.com/auth/azure/callback # Cloudflare R2 Backup Configuration -R2_ENDPOINT=https://your-account-id.r2.cloudflarestorage.com -R2_ACCESS_KEY=your-r2-access-key -R2_SECRET_KEY=your-r2-secret-key +# Get these from your Cloudflare dashboard -> R2 -> Manage R2 API Tokens +R2_ENDPOINT=https://.r2.cloudflarestorage.com +R2_ACCESS_KEY=your-r2-access-key-id +R2_SECRET_KEY=your-r2-secret-access-key +R2_BUCKET_NAME=recipes-backups # Automatic Backup Schedule # Options: test (every 1 minute), daily, weekly, disabled BACKUP_INTERVAL=weekly -# Frontend API URL (for frontend container) -VITE_API_URL=https://your-domain.com +# Frontend API URL (for frontend container to connect to backend via docker-compose) +# Use the service name 'backend' from docker-compose.yaml +VITE_API_URL=http://backend:8000 diff --git a/backend/docker-compose.yaml b/backend/docker-compose.yaml index 9570d77..beb8623 100644 --- a/backend/docker-compose.yaml +++ b/backend/docker-compose.yaml @@ -41,6 +41,7 @@ services: R2_ENDPOINT: ${R2_ENDPOINT} R2_ACCESS_KEY: ${R2_ACCESS_KEY} R2_SECRET_KEY: ${R2_SECRET_KEY} + R2_BUCKET_NAME: ${R2_BUCKET_NAME} # Backup Schedule BACKUP_INTERVAL: ${BACKUP_INTERVAL:-weekly} diff --git a/docker-compose.yaml b/docker-compose.yaml index 1613318..1ece1fb 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -41,6 +41,7 @@ services: R2_ENDPOINT: ${R2_ENDPOINT} R2_ACCESS_KEY: ${R2_ACCESS_KEY} R2_SECRET_KEY: ${R2_SECRET_KEY} + R2_BUCKET_NAME: ${R2_BUCKET_NAME} # Backup Schedule BACKUP_INTERVAL: ${BACKUP_INTERVAL:-weekly}