-
Download and Install Mysql server and a mysql client
-
Start the server
-
Connect as root user (On unix you have to connect as unix root user)
mysql -u root
-
CREATE USER 'gardenshare'@'localhost' IDENTIFIED BY 'somepassword'
-
Create a new user for gardenshare
GRANT ALL PRIVILEGES ON *.* to 'gardenshare'@'localhost';
-
FLUSH PRIVILEGES;
-
Create the database
CREATE DATABASE gardenshare;
-
Set up a mysql server locally
-
Create a user and database table in mysql
-
Create a 'secrets' file in
secrets/env.sh
It should look like this (make sure that it has LF endings and not CRLF)
export DB_URL=**************/DB_TABLE_NAME
export DB_USER=**************
export DB_PASS=**************
-
Run
. secrets/env.sh
to load the secrets -
Run
mvn spring-boot:run
to start the server -
Connect to the server using
http://localhost:8080
-
Set up a mysql server locally
-
Create a user and database table in mysql
-
Run
docker build . -t gardenshare
-
Run
docker run -it --network=host -e DB_URL=****/DB_TABLE_NAME -e DB_USER=**** -e DB_PASS=***** gardenshare
-
Connect to the server using
http://localhost:8080