Skip to content

toczekmj/Spring-Next-MovieDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Movie Database

Spring-Next-MovieDB

Authors

Tech Stack

Client: Next.js, TypeScript

Server: Java, Spring, Docker, Bash, Node

Run Locally

Clone the project, make sure that Node, Java, Docker and MySql are installed.

Compile frontend

  git clone https://github.com/toczekmj/Interfejsy-Graficzne.git

Go to the project directory

  cd Interfejsy-Graficzne/frontend

Install dependencies

  npm install

Start the server

  npm run dev

Compile Backend

Go to the project directory

  cd Interfejsy-Graficzne/InterfejsyGraficzne

Edit application.properties

  nano /src/main/resources/application.properties

Set the following:

  working.environment = #can be: prod, dev, local 
  seed.on.startup = #true if you want to fill the database with randomly generated data
  database.port = #make sure it matches your MySql instance
  database.password = #your database password
  database.username = #your database login 
  database.name = #Provide your database name but remember to adjust it the environment. e.g. for local instance you will need to create schema named XXXXLocal and then you need to provide just XXXX here 
  database.ip = #in case you are not running MySql instance locally, provide it's ip
  

After that, you should be able to perform

  sudo chmod +x run.sh
  ./run.sh

and if you had your docker instance configured properly, just select option: 0) run autostart script which should run the app.

One thing you should keep in mind is, that this docker container is running on port 80 and also forwarding traffic on port 80 from your computer. You can change that with:

nano run.sh 

and change ports to your liking here:

docker_run_detached() {
  docker run -d -p 80:80 --name "$1" "$2"
}

Remember that local instance of frontend is running on http://localhost:5001/

Also you shouldn't care about update.sh file, which was designed to work with cron and to pull latest changes from main branch of this repo, to the remote server. What this file does it checkes if there was any update to main branch of this repository and in case it was, pulls lates changes and recompiles the docker image.

Screenshots

Index Search Register Add Movie Details Comment Share List Create List

About

Projekt Grupy E na zajęcia z Interfejsów Graficznych

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published