Skip to content

Add Docker setup for unified local development#18

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-docker-setup
Draft

Add Docker setup for unified local development#18
Copilot wants to merge 4 commits intomainfrom
copilot/add-docker-setup

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Implements containerized development environment supporting single-command launch of frontend and database services, with separate production and development configurations.

Production Setup

Multi-stage Dockerfile builds React app with Node.js 20, serves via nginx:

  • Stage 1: npm installnpm run build/app/dist
  • Stage 2: nginx alpine serving static files on port 80
  • Security headers (X-Frame-Options, X-Content-Type-Options, X-XSS-Protection)
  • Static asset caching (1 year) with no-cache index.html

Exposed as port 3000 in docker-compose.yml

Development Setup

Vite dev server with hot-reload on port 5173:

  • Selective volume mounting: source files only (src/, public/, config files)
  • Preserves image node_modules to avoid re-install on container start
  • Same PostgreSQL service shared between prod/dev

Database

PostgreSQL 15 included for future backend integration:

  • Port 5432, persistent volume postgres-data
  • Health checks configured (pg_isready)
  • Credentials via DB_PASSWORD environment variable

npm Timeout Handling

Build reliability achieved through fetch timeout configuration:

RUN npm config set fetch-retry-maxtimeout 120000 && \
    npm config set fetch-retry-mintimeout 20000 && \
    npm config set fetch-timeout 300000 && \
    npm install

Usage

# Production
docker compose up -d

# Development with hot-reload
docker compose -f docker-compose.dev.yml up

Documentation added to README.md, web-ui/README.md, and DOCKER.md.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 127.0.0.11
    • Triggering command: REDACTED, pid is -1 (packet block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[TR-0001] Add Docker setup for unified local development</issue_title>
<issue_description>Provide a Dockerfile and (if necessary) a docker-compose.yml to support local setup for both frontend and backend components. The setup should allow developers to launch the environment with a single command and prepare for later deployment modes.

Definition of Ready:

  • This issue is labeled with TR-0001 and 'status:Backlog'.
  • Clarity about which components are to be containerized.
  • Task is sized for a single developer.

Definition of Done:

  • Dockerfile(s) and/or docker-compose.yml in repo.
  • Verified that frontend and backend start together locally.
  • Readme updated with new setup/launch instructions.
  • Product Owner review/accepts containerization approach.
    </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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 and others added 3 commits February 11, 2026 15:43
- Add production Dockerfile for web-ui with multi-stage build
- Add development Dockerfile for hot-reload support
- Add docker-compose.yml for production deployment
- Add docker-compose.dev.yml for development environment
- Add nginx configuration for serving React app
- Add .dockerignore for optimized builds
- Add .env.example for environment variables
- Update README files with Docker instructions

Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
- Update Dockerfile.dev with npm timeout configuration
- Simplify docker-compose.dev.yml to mount only source files
- Test and verify both production and development environments work
- Production: web-ui on port 3000, PostgreSQL on port 5432
- Development: web-ui with hot-reload on port 5173, PostgreSQL on port 5432

Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
- Create DOCKER.md with comprehensive setup guide
- Document production and development modes
- Include quick start instructions
- Add troubleshooting section
- Document architecture and file structure

Co-authored-by: samuelmr <2461240+samuelmr@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Docker setup for unified local development Add Docker setup for unified local development Feb 11, 2026
Copilot AI requested a review from samuelmr February 11, 2026 15:50
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.

[TR-0001] Add Docker setup for unified local development

2 participants