You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Dockerfile for backend and frontend applications
* **Backend Dockerfile**
- Add instructions to build and run the backend server
- Use node:20-alpine as the base image
- Set the working directory to /app
- Copy package.json and pnpm-lock.yaml to the working directory
- Install dependencies using pnpm install --frozen-lockfile
- Copy the rest of the application code to the working directory
- Build the application using pnpm nx build devmx --verbose
- Expose port 3000
- Set the command to run the application using node dist/apps/server/main.js
* **Frontend Dockerfile**
- Add instructions to build and run the frontend application
- Use node:20-alpine as the base image
- Set the working directory to /app
- Copy package.json and pnpm-lock.yaml to the working directory
- Install dependencies using pnpm install --frozen-lockfile
- Copy the rest of the application code to the working directory
- Build the application using pnpm nx build devmx --verbose
- Expose port 4200
- Set the command to run the application using pnpm nx serve devmx
* **package.json**
- Add docker-compose script to start all services using Docker Compose
* **docker-compose.yml**
- Add server service to build and run the backend server
- Add devmx service to build and run the frontend application
- Configure mongodb service to depend on server and devmx services
0 commit comments