User Tools

Site Tools


dndwebapp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dndwebapp [2020/02/21 21:29]
chasty2 [Back End Documentation]
dndwebapp [2020/02/28 21:11] (current)
chasty2 [Back End Documentation]
Line 33: Line 33:
 Database schema, version 2: Database schema, version 2:
 __ __
 +
 +**one baseStats per charSheet
  
 {{:​dnd_db_v2.jpg?​nolink&​400|}} {{:​dnd_db_v2.jpg?​nolink&​400|}}
Line 39: Line 41:
 Docker Notes: Docker Notes:
 __ __
 +<code bash>
 ## Enter these commands in bash on a Linux environment. ## Enter these commands in bash on a Linux environment.
-## Pull mysql 5.7 docker image (mysql 8 works, but a bugfix is needed). 
-docker pull mysql:5.7 
- 
-## Insert firewall rule for docker container and save.  
-## NOTE: Docker daemon must be started after iptables is running. 
-## NOTE: If iptables or a firewall is not running this is not necessary. ​ 
-iptables -A INPUT -i docker0 -p tcp -m tcp --dport 3306 -j ACCEPT 
-service iptables save 
- 
-## create and start docker image 
-docker run -d --name=lugdb -e MYSQL_ROOT_PASSWORD=test -e MYSQL_DATABASE=lugdb -p 3306:3306 mysql:5.7 
- 
-## enter container 
-docker exec -it lugdb -p 
  
-## (in mysql) Create accounts table+## create docker image from dockerfile and run it. Must be in initDB directory to build lug-mysql image 
-use lugdb +docker build -t lug-mysql . 
-CREATE TABLE account( +docker run -d --name=lugdb -e MYSQL_ROOT_PASSWORD=test -p 3306:3306 lug-mysql
-    id INT NOT NULL AUTO_INCREMENT,​ +
-    accountName VARCHAR(20) NOT NULL, +
-    password VARCHAR(100) NOT NULL, +
-    email VARCHAR(254) NOT NULL, +
-    PRIMARY KEY ( id ) +
-);+
  
-## (in mysql) Show table. +## delete image and instance if you need to rebuild ​ 
-SELECT * from account;+docker rm lugdb 
 +docker image rm lug-mysql
  
-## (in myqsl) Exit the container. +## enter mysql  
-quit+docker exec -it lugdb mysql -uroot -p   
 +</​code>​
 ===== Meeting Notes===== ===== Meeting Notes=====
 ==== Meeting 1 [11/​09/​2018]==== ==== Meeting 1 [11/​09/​2018]====
dndwebapp.1582320585.txt.gz · Last modified: 2020/02/21 21:29 by chasty2