diff --git a/config/db/setup.sql b/config/db/setup.sql new file mode 100644 index 00000000..fddb4b98 --- /dev/null +++ b/config/db/setup.sql @@ -0,0 +1,142 @@ +-- -------------------------------------------------------- +-- Setup the DB the first time in development +-- -------------------------------------------------------- + +-- Authorize the defalt stats provider +UPDATE stats_provider SET authorized = 1 WHERE id = 1; +SELECT * FROM stats_provider; + +UPDATE stats_provider_auth_ip SET address = '0.0.0.0/0' ; +SELECT * FROM stats_provider_auth_ip; + +-- Authorize bot players +INSERT INTO player (name, password, email, country, rank_id) values ('T. Karlsson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Edgren', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('P.K. Johansson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Jonsson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Wallberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('A. Andersson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('H. Karlsson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('K. Bergqvist', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Hornlund', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Lopez', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Gothberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('P. Hoyles', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Kopparhed', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('C. Cyreus', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('T. Dahl', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Bagge', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('T. Laedre', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('L. Martensson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Mod', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Eriksson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Sundberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('N. Goksu', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('N. Fegraeus', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('F. Lindblom', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Stenkvist', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Lord', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('L. Fujita', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('E. Sjovold', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('T. Holmsten', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Ostman', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('T. Soderman', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Wiksten', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Sanick', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Salt', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Doran', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Lindgren', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Sjoberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Votypka', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('B. Pajor', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Andersson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('P. Lindholm', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('P. OShaughnessy', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('N. Stromquist', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Strandberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Fritze', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Norberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('B. Hedberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('O. Carlen', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('K. Hegethorn', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Sirland', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Dawsari', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('L. Gustavsson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('C. Bergqvist', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Kjellstrom', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('P. Soderlund', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('H. Andersson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Gonzales', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Crabtree', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('C. Tou', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('G. Pigula', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Le', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Pace', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('K. Lee', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Walton', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. King', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('F. Morales', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('L. Castillo', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Persson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('U. Rask', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Dohl', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Kylmamaa', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Parkinson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Newton', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('A. Papasavas', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('L. Josephson', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Decker', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Rudberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Hedlund', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('C. Grass', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Aberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Smedberg', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('P. Osterblom', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Evans', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Abdey', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Aberin', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Belanger', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Biro', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Brassard', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Ceron', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Choy', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Davey', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('E. Douridas', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('C. Elliott', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Evans', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Gimbel', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Hallwood', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Hart', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('K. Hoang', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Kerr', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('F. Liliegren', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Linde', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Livesey', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('R. Love', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('A. Marini', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. North', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Pinkerton', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Price', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Rickard', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Ross', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('E. Smith', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('N. White', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('K. Yip', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('W. Young', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('D. Yee', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Vifian', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('B. Smith', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('L. Brown', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('S. Flyte', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('C. Barnett', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('M. Cassidy', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('T. Kingston', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('I. Ackworth', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. VanRooyen', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Hartling', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('J. Hargelid', '', 'bot@botNames.ai', 'US', 0); +INSERT INTO player (name, password, email, country, rank_id) values ('C. Clarke', '', 'bot@botNames.ai', 'US', 0); + +-- Authorize a 'test' player of id '100000001'. The ID '100000001' is the ID of the first player to register with the master server (PRMasterServer) +INSERT INTO player (id, name, password, email, country, rank_id) values (100000001, 'test', '098f6bcd4621d373cade4e832627b4f6', 'test@test.com', 'US', 0); +SELECT id, name, password, email, country, rank_id FROM player; diff --git a/docker-compose.yml b/docker-compose.yml index 4fb13659..949a087a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,6 +55,7 @@ services: volumes: - ./src/ASP/system/sql/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro # Seed the DB the first time - ./src/ASP/system/sql/data.sql:/docker-entrypoint-initdb.d/02-data.sql:ro # Seed the DB the first time + - ./config/db/setup.sql:/docker-entrypoint-initdb.d/03-setup.sql:ro # Setup the DB the first time - ./config/db/my.cnf:/etc/my.cnf:ro - db-volume:/var/lib/mysql networks: diff --git a/docs/full-bf2-stack-example/docker-compose.build.yml b/docs/full-bf2-stack-example/docker-compose.build.yml index ef8433c8..a44bf955 100644 --- a/docs/full-bf2-stack-example/docker-compose.build.yml +++ b/docs/full-bf2-stack-example/docker-compose.build.yml @@ -14,3 +14,4 @@ services: volumes: - ../../src/ASP/system/sql/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro # Seed the DB the first time - ../../src/ASP/system/sql/data.sql:/docker-entrypoint-initdb.d/02-data.sql:ro # Seed the DB the first time + - ../../config/db/setup.sql:/docker-entrypoint-initdb.d/03-setup.sql:ro # Setup the DB the first time