Open stynan27 opened 1 year ago
Will likely put off database implementations until sprint 4 or 5 with production deployment.
https://docs.docker.com/engine/install/ubuntu/
sudo groupadd docker
sudo gpasswd -a $USER docker
newgrp docker
docker ps
-> to test
docker run --detach --restart=always --env MYSQL_ROOT_PASSWORD=dummypassword --env MYSQL_USER=blockheads-developer --env MYSQL_PASSWORD=dummypassword --env MYSQL_DATABASE=blockheads-database --name blockheads-mysql --publish 3306:3306 mysql:8-oracle
sudo apt-get install mysql-shell
mysqlsh
\connect blockheads-developer@localhost:3306
\use blockheads-database # To select DB schema
\sql
SHOW TABLES; # Show all DB tables in the blockheads-database schema
select * from user_account; # Select all columns from the tables of Users.
select * from lego_set; # Select all columns from the tables of Lego Sets.
\quit
NOTE: We will want to create some sort of startup script for this so you don't need to manually bring up the container when starting the VM.
-> Performed in docker command via --restart=always
flag
Description
Configure Java Spring Boot application with JPA/Hibernate packages used to work with SQL database repositories. This initial database will ~host our User's table which~ will enable us to persist data between sessions/have example data to test with.
Subtask of #35