deploy_placement_batch_docker
deploy_placement_batch_docker
This guide provides a step-by-step deployment plan for hosting the Placement-Batch
It covers:
Frontend (Angular) Docker Container
Backend (Spring Boot) Docker Container
Database (Amazon RDS MySQL) Managed by AWS
Docker Compose for easy management
=====================================
1. INSTALL DOCKER & DOCKER COMPOSE
=====================================
=====================================
2. DOCKERIZE BACKEND (SPRING BOOT)
=====================================
=====================================
3. DOCKERIZE FRONTEND (ANGULAR)
=====================================
FROM nginx:latest
COPY --from=build /app/dist/angular-frontend /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
=====================================
4. USING DOCKER COMPOSE
=====================================
services:
backend:
build: ./backend
container_name: backend
ports:
- "8080:8080"
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://your-rds-endpoint:3306/placement_b
- SPRING_DATASOURCE_USERNAME=placement_user
- SPRING_DATASOURCE_PASSWORD=securepassword
depends_on:
- frontend
frontend:
build: ./frontend
container_name: frontend
ports:
- "80:80"
depends_on:
- backend
[Unit]
Description=Docker Compose App Service
After=network.target
[Service]
WorkingDirectory=/home/ubuntu/Placement-Batch
ExecStart=/usr/local/bin/docker-compose up -d
ExecStop=/usr/local/bin/docker-compose down
Restart=always
[Install]
WantedBy=multi-user.target
=====================================
6. FINAL TESTING
=====================================
=====================================
SUMMARY
=====================================
=====================================
Your Placement-Batch Project is Fully Dockerized!
=====================================