This development environment configures all the services needed to work on the cloud resource reservation system, including:
- 🖥️ React Frontend (reservation-fe)
- 🔌 Backend (reservation-be)
- 🔑 Keycloak for authentication
- 🗄️ PostgreSQL for databases
- 🐳 Docker
- 🔄 Docker Compose
project-root/
├── docker-compose.yml # Docker Compose configuration
├── init-multiple-postgres-dbs.sh # Database initialization script
├── keycloak/
│ └── import/
│ └── resource-management-realm.json # Keycloak realm configuration
├── reservation-fe/ # Frontend source code
└── reservation-be/ # Backend source code
-
Make sure the
reservation-feandreservation-befolders contain the respective source code -
Make the database initialization script executable:
chmod +x init-multiple-postgres-dbs.sh
-
Modify your hosts file to redirect "backend" and "keycloak" to your local machine:
-
For Linux/macOS:
sudo nano /etc/hosts
Add these lines:
127.0.0.1 backend 127.0.0.1 keycloakSave the file (Ctrl+O, then Enter) and exit (Ctrl+X)
-
For Windows:
- Open Notepad as Administrator
- Open the file
C:\Windows\System32\drivers\etc\hosts - Add these lines:
127.0.0.1 backend 127.0.0.1 keycloak - Save the file
-
-
Start the development environment:
docker-compose up -d
-
The services will be available at the following addresses:
- 🌐 Frontend: http://localhost:3000
- 🔌 Backend API: http://localhost:8080/api
- 🔑 Keycloak: http://localhost:8180
- 🗄️ PostgreSQL Database: localhost:5432
After starting the containers with Docker Compose and ensuring all services are running properly, you can access the application using a bootstrap admin account:
- 🔗 URL: http://localhost:3000
- 👤 Username: admin
- 🔒 Password: password
A demo version of the application is available at:
- 🔗 URL: https://204.216.215.139/
- 👤 Username: admin
- 🔒 Password: password
- 🌐 URL: http://localhost:8180/admin
- 👤 Username: admin
- 🔒 Password: admin
- Administrator:
- 👤 Username: admin
- 🔒 Password: password
- 📧 Email: mario.rossi@example.com
- 🎭 Roles: admin, user
The frontend is configured to automatically connect to the backend and Keycloak with the following settings:
- 🔌 Backend API: http://localhost:8080/api
- 🔑 Keycloak: http://localhost:8180
- 🏰 Realm: resource-management
- 🆔 Client ID: resource-management-app
A Helm chart is available for deploying this application on Kubernetes. You can find the chart and instructions in the following repository:
If you encounter permission errors when starting the containers:
sudo chown -R $USER:$USER reservation-fe reservation-be keycloak
chmod -R 755 reservation-fe reservation-be keycloakTo stop and remove all containers, networks, and volumes:
docker-compose down -v