Skip to content

Conversation

@p3n74
Copy link

@p3n74 p3n74 commented Aug 27, 2025

feat: Add Docker containerization with production-ready deployment

  • Add multi-stage Dockerfile optimized for Next.js standalone output
  • Include Bun runtime for database operations (sync, seed, reset)
  • Configure Next.js for standalone mode with proper static asset handling
  • Add docker-compose.yml with host network mode for external DB connectivity
  • Include comprehensive Docker documentation in README.md
  • Support for external MySQL database connections
  • Add .dockerignore for optimized build context
  • Enable database management scripts within containerized environment

Technical improvements:

  • Next.js standalone output for minimal production image
  • Proper static asset serving in Docker environment
  • Host network mode for reliable external database connectivity
  • Source files included for database operations
  • Bun configuration for TypeScript path alias resolution

p3n74 added 4 commits August 27, 2025 22:03
- Add multi-stage Dockerfile optimized for Next.js standalone output
- Include Bun runtime for database operations (sync, seed, reset)
- Configure Next.js for standalone mode with proper static asset handling
- Add docker-compose.yml with host network mode for external DB connectivity
- Include comprehensive Docker documentation in README.md
- Support for external MySQL database connections
- Add .dockerignore for optimized build context
- Enable database management scripts within containerized environment

Technical improvements:
- Next.js standalone output for minimal production image
- Proper static asset serving in Docker environment
- Host network mode for reliable external database connectivity
- Source files included for database operations
- Bun configuration for TypeScript path alias resolution
feat: Add Docker containerization with production-ready deployment
- Align port handling to use ENV PORT; map "${PORT}:${PORT}" in compose
- Switch to bridge networking with extra_hosts (host.docker.internal)
- Include .env in image and allow it in build context (.dockerignore update)
- Add Alpine build/runtime deps for native modules (node-pty, mysql2):
  libc6-compat, libstdc++, musl-dev, linux-headers, python3, make, g++,
  pkgconfig, ca-certificates, openssl, git, bash, curl
- Install bun and ensure proper symlinks; copy bun into runtime stage
- Use Next.js standalone output; copy src and node_modules for DB scripts
- Update db scripts to `bun build --target=node` then run with node to avoid aborts
- Use host.docker.internal for DB host; verified MariaDB connectivity
- Remove obsolete compose version field; clean up port exposure (ENV/EXPOSE)

Result: container starts on the configured PORT and `npm run db:sync` works against MariaDB.
fix: added math.h when compiling
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.

1 participant