accountill
accountill copied to clipboard
docker build fail
Problem
The Docker build failed initially due to the server using an outdated Node.js version and a missing production start script in package.json. Additionally, the build context was too large.
Solution
- Updated the Node.js base image to node:18-alpine in the Dockerfile.
- Added the required
start-prodscript toserver/package.json. - Added a
.dockerignorefile to prevent copying unnecessary files during build. - Fixed port conflicts and corrected the ports section in
docker-compose.yml. - Ensured all dependencies were properly installed and the compose setup now works as expected.
Result
All containers (MongoDB, server, client) now build and run successfully, and the application is accessible via the client port.
Deploy request for accountill pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 682205bfffc39333e504d2094262d6bddd9e6b08 |