Skip to content

feat: add .env.example with env var documentation (Issue #3) - #5

Merged
cabrasky merged 2 commits into
mainfrom
issue-3-env-vars
Jul 1, 2026
Merged

cabrasky merged 2 commits into
mainfrom
issue-3-env-vars

Conversation

@cabrasky

@cabrasky cabrasky commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Descripción\nAgrega archivo .env.example con documentación de todas las variables de entorno necesarias.

Cambios

  • Crea table2taste/.env.example con variables para DB, backend Spring y entorno

Variables documentadas

  • POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
  • DB_URL, JWT_SECRET, JWT_EXPIRATION_MS
  • TABLE_PASSWORD, DEFAULT_LANGUAGE, FILE_PATH
  • SPRING_PROFILES_ACTIVE

Closes #3

cabrasky added 2 commits July 1, 2026 08:12
- Add health check for db using pg_isready (interval: 10s, timeout: 5s, retries: 5, start_period: 30s)
- Add health check for backend using actuator/health endpoint (interval: 15s, timeout: 5s, retries: 3, start_period: 60s)
- Add health check for frontend using curl on port 80 (interval: 15s, timeout: 5s, retries: 3, start_period: 30s)
- Update depends_on to use condition: service_healthy for ordered startup

Closes #1
Copilot AI review requested due to automatic review settings July 1, 2026 08:13
@gitguardian

gitguardian Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
14784426 Triggered Generic High Entropy Secret 5318b80 .env.example View secret
34427002 Triggered Generic Password 5318b80 .env.example View secret
14784427 Triggered Generic Password 5318b80 .env.example View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@cabrasky
cabrasky merged commit 9ba5991 into main Jul 1, 2026
1 of 2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a repository-level .env.example intended to document environment variables for local/deployed runs, and updates docker-compose.yml to use healthchecks and depends_on health conditions to improve startup ordering.

Changes:

  • Added .env.example documenting DB and Spring-related environment variables.
  • Updated docker-compose.yml to gate frontend/backend startup on dependent services being healthy.
  • Added healthchecks for backend, frontend, and db services.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docker-compose.yml Adds healthchecks and switches depends_on to service_healthy conditions for improved orchestration.
.env.example Adds an example env file documenting required environment variables (but currently includes real-looking secrets).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .env.example
Comment on lines +2 to +4
POSTGRES_USER=table-2-taste
POSTGRES_PASSWORD=SCbK9nkVHcgjLS
POSTGRES_DB=table2taste
Comment thread .env.example
Comment on lines +8 to +10
JWT_SECRET=5ee9b307d37af03d6081d53f0ab8756b9d38b00f61a125525531e1b436b0f66d
JWT_EXPIRATION_MS=3600000
TABLE_PASSWORD=xgEne4Kq
Comment thread .env.example
@@ -0,0 +1,15 @@
# Database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: externalizar secrets a env vars (eliminar hardcode en application.properties)

2 participants