This project can be run using Docker Compose, which will set up both the application and PostgreSQL database.
- Docker
- Docker Compose
-
Build and run the application:
docker-compose up --build
-
Access the application:
- Main Application: http://localhost:8080
- Admin Panel: http://localhost:8080/Admin/Login
-
Stop the application:
docker-compose down
- Container:
tourdb - Port: 5432
- Database:
tourdb - Username:
postgres - Password:
password
- Container:
tour-app - Port: 8080
- Technology: Java 17 + Maven + webapp-runner
The application uses the following environment variables:
DATABASE_HOST: Database connection URLDBUSER: Database usernameDBPASS: Database password
The application automatically creates the following tables on startup:
Users- User accountsAdmin- Admin accountsTour- Tour packagesBooking- Tour bookingsEnquiry- Customer enquiriesIssues- Support issues
docker-compose up --builddocker-compose logs -f appdocker-compose exec postgres psql -U postgres -d tourdb# Stop services
docker-compose down
# Stop and remove volumes (WARNING: This will delete all data)
docker-compose down -v- Port conflicts: Make sure ports 8080 and 5432 are not in use
- Database connection issues: Wait for the database to be ready before the app starts
- Build failures: Check that all source files are present and Maven dependencies are available
You may need to create an admin account manually through the database or by registering through the application interface.