Skip to content

Fix duplicate environment blocks in docker-compose.prod.yml#611

Merged
jthrilly merged 2 commits intonextfrom
copilot/sub-pr-610
Feb 9, 2026
Merged

Fix duplicate environment blocks in docker-compose.prod.yml#611
jthrilly merged 2 commits intonextfrom
copilot/sub-pr-610

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

The docker-compose.prod.yml file defined environment twice for the fresco service, causing YAML to silently drop the first block's variables.

Changes

  • Merged duplicate environment blocks into single definition
  • Removed quotes from UPLOADTHING_TOKEN value to prevent literal quotes in environment variable
  • Consolidated all environment variables: DATABASE_URL, DATABASE_URL_UNPOOLED, PUBLIC_URL, UPLOADTHING_TOKEN

Before:

services:
  fresco:
    environment:
      - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/postgres
      - UPLOADTHING_TOKEN='token'
    # ... other config ...
    environment:  # ← Second definition overwrites first
      DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/fresco

After:

services:
  fresco:
    environment:
      DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/fresco
      DATABASE_URL_UNPOOLED: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/fresco
      PUBLIC_URL: https://mywebsite.com
      UPLOADTHING_TOKEN: token

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI mentioned this pull request Feb 9, 2026
6 tasks
@vercel
Copy link

vercel bot commented Feb 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fresco-sandbox Ready Ready Preview, Comment Feb 9, 2026 11:39am
fresco-storybook Ready Ready Preview, Comment Feb 9, 2026 11:39am

Request Review

Co-authored-by: jthrilly <1387940+jthrilly@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback from review on version 4.0.0 update Fix duplicate environment blocks in docker-compose.prod.yml Feb 9, 2026
Copilot AI requested a review from jthrilly February 9, 2026 11:36
@jthrilly jthrilly marked this pull request as ready for review February 9, 2026 11:38
Copilot AI review requested due to automatic review settings February 9, 2026 11:38
@jthrilly jthrilly merged commit ac2cb09 into next Feb 9, 2026
5 of 6 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Resolves an issue in docker-compose.prod.yml where duplicate environment keys for the fresco service caused the first block to be ignored, leading to unexpected container configuration in production deployments.

Changes:

  • Removed the duplicate environment section for the fresco service.
  • Consolidated environment variables into a single mapping-style environment block.
  • Adjusted PUBLIC_URL and UPLOADTHING_TOKEN definitions as part of the consolidation.

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

Comment on lines 15 to 16
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/fresco
DATABASE_URL_UNPOOLED: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/fresco
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

DATABASE_URL/DATABASE_URL_UNPOOLED point to the fresco database, but the postgres service is configured with POSTGRES_DB=postgres (so it will initialize a postgres database by default). This mismatch will cause connection failures on a fresh volume unless the fresco DB is created elsewhere. Align the DB name by either changing POSTGRES_DB to fresco or updating the URLs to use the same database name (ideally via a shared variable).

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +18
PUBLIC_URL: https://mywebsite.com
UPLOADTHING_TOKEN: token
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

PUBLIC_URL and especially UPLOADTHING_TOKEN are hardcoded here while an env_file: .env is also loaded; environment values take precedence over env_file, so this will override any real values provided via .env (and encourages committing secrets). Prefer referencing variables (e.g. ${PUBLIC_URL} / ${UPLOADTHING_TOKEN}) or remove these entries and supply them via .env/secrets at deploy time.

Suggested change
PUBLIC_URL: https://mywebsite.com
UPLOADTHING_TOKEN: token
PUBLIC_URL: ${PUBLIC_URL}
UPLOADTHING_TOKEN: ${UPLOADTHING_TOKEN}

Copilot uses AI. Check for mistakes.
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.

3 participants