This is the main repository for the Andy Grails' website — a personal project to showcase and stream music under the nickname Andy Grails. The site is powered by a Java backend and an Angular frontend, structured as Git submodules.
This repository acts as a wrapper for the two core components:
andy.grails/
- andy.grails.backend/ (Java Spring Boot backend: API, data services)
- andy.grails.frontend/ (Angular frontend: UI and client logic)
-
backend:
A Java Spring Boot application providing RESTful APIs to serve music data, media, and metadata. -
frontend:
An Angular-based web application that presents the user interface, consumes the backend API, and delivers the overall user experience.
To clone this repository:
git clone [email protected]:aistomin/andy.grails.gitNote: Submodules are not required to be initialized for running the application with Docker. The scripts pull Docker images directly from Docker Hub based on Git revisions.
Each submodule has its own README.md with specific instructions for building
and running the backend and frontend.
This repository includes convenient scripts to run the entire application stack using Docker:
- Docker and Docker Compose installed
- Git repository cloned (submodules are not required to be initialized)
Starts the complete application stack (frontend + backend + database) using Docker Compose.
./start.shWhat it does:
- Gets the current Git revision from the main repository
- Pulls Docker images from Docker Hub using revision-based tags
- Starts PostgreSQL database, backend API, and frontend
- Provides access URLs for all services
Access URLs:
- Frontend: http://localhost:4200
- Backend API: http://localhost:8080
- Database: localhost:55432
Stops all running containers and cleans up the application stack.
./stop.shDeploys the application to a specific Git revision, allowing easy rollbacks and deployments.
./deploy.sh <git-revision>Examples:
# Deploy to a specific commit
./deploy.sh abc1234
# Deploy to a branch
./deploy.sh main
# Deploy to a tag
./deploy.sh v1.0.0What it does:
- Checks for local changes (fails if any uncommitted changes exist)
- Validates the specified Git revision exists
- Checks out the revision and updates submodules
- Stops the current application
- Starts the application with the new revision
Safety Features:
- Prevents deployment with uncommitted changes
- Validates revision existence before checkout
- Provides helpful error messages and suggestions
The application uses Docker Hub images with revision-based tagging:
- Backend:
andygrails/andy-grails-backend:<revision> - Frontend:
andygrails/andy-grails-frontend:<revision>
You can customize the database configuration using environment variables:
DB_NAME(default: andy_grails)DB_USER(default: andy)DB_PASSWORD(default: andy)
# View application logs
docker compose logs -f
# View logs for specific service
docker compose logs -f backend
docker compose logs -f frontend
docker compose logs -f db
# Remove all containers and volumes
docker compose down -v
# Rebuild and start (if you need to rebuild images)
docker compose up --build -dE2E tests live in this repository (outside the submodules) under playwright/ and assume the application is already running in Docker.
-
Run the application stack and ensure the frontend is reachable at
http://localhost:4200:./start.sh
./run-e2e-tests.shTo target a different URL, override the PLAYWRIGHT_BASE_URL environment variable:
PLAYWRIGHT_BASE_URL=http://localhost:4300 npm test