GithubHelp home page GithubHelp logo

petsitter-backend's Introduction

This README consists of three parts. [based on shape shop README]

  1. Running the spring application within the IDE against the DB in a docker container.
  2. Running in two containers using docker-compose

1. Running the application within the IDE against the DB in a docker container

To run the database :

kill off all old processes (optional) run :

KILL.BAT

Step 1 - run mysql container instance

docker run -d -p 3306:3306 --name=petsitter-db-container --env="MYSQL_ROOT_PASSWORD=root" --env="MYSQL_PASSWORD=root" --env="MYSQL_DATABASE=petsitter" mysql

Step 2 - setup the schema

docker exec -i petsitter-db-container mysql -uroot -proot petsitter < SCHEMA.sql

Potential errors

  • ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

    • Just wait 15 seconds and try again
  • unknown shorthand flag: 'u' in -uroot

    • This is because using azure context. Reset to default context : docker context use default

Step 3 - setup the test data

docker exec -i petsitter-db-container mysql -uroot -proot petsitter < TEST_DATA.sql

In IDE should be able to see this with this URL : jdbc:mysql://localhost:3306/petsitter

In spring properties add this :hibernate.dialect spring.datasource.url=jdbc:mysql://localhost:3306/petsitter?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false

Step 4 - START BACKEND APP IN IDE

it should be possible to run the client side as well.

2. Running the application and DB via two docker containers, using docker-compose

see README in shape shop

petsitter-backend's People

Contributors

oliverwatkins avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.