/project87

Ticket Booking System

Primary LanguageTypeScript

Project 87

Ticket Booking Application with QR code tickets

https://gitorko.github.io/ticket-booking-system/

Version

Check version

$java --version
openjdk version "21.0.3" 2024-04-16 LTS

node --version
v16.16.0

yarn --version
1.22.18

Postgres DB

docker run -p 5432:5432 --name pg-container -e POSTGRES_PASSWORD=password -d postgres:14
docker ps
docker exec -it pg-container psql -U postgres -W postgres
CREATE USER test WITH PASSWORD 'test@123';
CREATE DATABASE "test-db" WITH OWNER "test" ENCODING UTF8 TEMPLATE template0;
grant all PRIVILEGES ON DATABASE "test-db" to test;

docker stop pg-container
docker start pg-container

Dev

To run the backend in dev mode.

./gradlew clean build
./gradlew bootRun

To Run UI in dev mode

cd ui
yarn install
yarn build
yarn start

Open http://localhost:4200/

Prod

To run as a single jar, both UI and backend are bundled to single uber jar.

./gradlew cleanBuild
cd build/libs
java -jar project87-1.0.0.jar

Open http://localhost:8080/

Docker

./gradlew cleanBuild
docker build -f docker/Dockerfile --force-rm -t project87:1.0.0 .
docker images |grep project87
docker tag project87:1.0.0 gitorko/project87:1.0.0
docker push gitorko/project87:1.0.0
docker-compose -f docker/docker-compose.yml up