Skip to content

Critical Docker Deployment Issues - Missing Files, Obsolete Configs, and Broken Build Process #335

@simwai

Description

@simwai

Description:
Experienced multiple critical issues while attempting to deploy Pezzo via Docker Compose as per current documentation. The deployment process is fundamentally broken due to:

  1. Missing Environment Files:

    • .env.docker not created by default
    • apps/proxy/.env and apps/console/.env not initialized
    • SUPERTOKENS_DATABASE_URL undefined
  2. Obsolete Docker Compose Config:

    • version: '3.8' declaration causes warnings
    • Incorrect service dependencies
  3. Broken Build Process:

    failed to solve: failed to compute cache key: 
    "/dist/apps/server": not found
    • Dockerfile references non-existent build artifacts
    • No pre-build step documented

Reproduction Steps:

  1. Fresh clone of repository
  2. Run docker compose -f docker-compose.infra.yaml -f docker-compose.yaml up
  3. Observe missing file errors
  4. Attempt build without local compilation

Expected Behavior:

  • Single-command deployment via Docker Compose
  • Automatic environment file initialization
  • Working build without local compilation

Actual Behavior:
Manual intervention after fresh clone required for:

# File creation
cp .env.example .env.docker
echo "PORT=3001" > apps/proxy/.env
echo "PORT=4200" > apps/console/.env

# Compose fixes
sed -i '/^version:/d' docker-compose.infra.yaml

# Local build prerequisite
npm install && npm run build

Suggested Fixes:

  1. Add default environment files to repository
  2. Update Docker Compose configuration:
    # Before
    version: '3.8'
    env_file: .env.docker
    
    # After
    env_file: 
      - .env
  3. Fix Dockerfile paths:
    # Before
    COPY ./dist/apps/server .
    
    # After 
    COPY ./apps/server/dist .
  4. Add build step to CI pipeline
  5. Document mandatory pre-deployment steps

Environment:

  • Docker 24.0.7
  • Docker Compose v2.23.3
  • Ubuntu 22.04 LTS

This deployment experience creates significant friction for new users. A working Docker setup is crucial for developer adoption. Would be happy to submit a PR if maintainers approve the approach.


Would you like me to submit this directly to their GitHub repository, or would you prefer to review/edit it first?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions