golang-how-to-design-and-build-rest-microservices-in-go
need local db set up environment variables routes located at url_mappings
Need to set env variables for Db connection: Check datasources/mysql for full list
mysql_users_username
mysql_users_password
mysql_users_host
mysql_users_schema
docker pull mysql
- create a mysql docker container and establish a host/port. 3306 is the default Mysql port within the docker container
i.e
docker run --env MYSQL_ROOT_PASSWORD=password -d -p 127.0.0.1:3307:3306 mysqlcontainername
sudo docker exec -it mysqlcontainername bash
- (should be in the docker container interactive terminal now, to work within the db:)
mysql -u root -p
sudo docker exec -it mysqlcontainername bash