Full-stack Angular 15 + Spring Boot Tutorial CRUD Application in that:
- Each Tutorial has id, title, description, published status.
- We can create, retrieve, update, delete Tutorials.
- We can also find Tutorials by title.
Run both Back-end & Front-end in one place:
More Practice:
Angular + Spring Boot: JWT Authentication and Authorization example
Build
docker compose build
Run all services
docker compose up
OR
Build and run all services in the background
docker compose up -d --build
Stop all services
docker compose down
Stop all services and remove volumes, networks, and images created by up
docker compose down -v --remove-orphans --rmi all
Show logs
docker compose logs -f
Show logs for a specific service
docker compose logs -f spring-boot
All services are using the same global environment file .env
Variables used in following services:
spring-boot
(Spring Boot)- FRONT_URL (Cors configuration)
- DATBASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD (MariaDB connection) used in
docker-compose.yml
to generate a custom connection string using service namemariadb
as host
angular
(Angular)- BACK_URL (Api URL)
If you want to add more environment variables, you need to update the
./angular/propagate-env.sh
script to propagate them to the Angular environment file./angular/src/environments/environment.ts
- BACK_URL (Api URL)
If you want to add more environment variables, you need to update the
mariadb
(MariaDB)- DATABASE_NAME, DATABASE_ROOT_PASSWORD, DATABASE_USERNAME, DATABASE_PASSWORD (MariaDB configuration)