bdd hydra sql test
This commit is contained in:
commit
fa8eb718a1
|
@ -0,0 +1,35 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
|
||||
db:
|
||||
image: mariadb
|
||||
restart: always
|
||||
environment:
|
||||
MARIADB_DATABASE: remote
|
||||
MARIADB_USER: remote
|
||||
MARIADB_PASSWORD: remote
|
||||
MARIADB_ROOT_PASSWORD: remote
|
||||
ports: "3306:3306"
|
||||
volumes:
|
||||
- ./mariadb/init:/docker-entrypoint-initdb.d:ro
|
||||
- mariadb_data:/var/lib/mysql
|
||||
- /etc/localtime:/etc/localtime
|
||||
expose:
|
||||
- 3306
|
||||
networks:
|
||||
- mse-network
|
||||
adminer:
|
||||
image: adminer
|
||||
restart: always
|
||||
ports:
|
||||
- 5080:8080
|
||||
networks:
|
||||
- mse-network
|
||||
volumes:
|
||||
mariadb_data:
|
||||
|
||||
networks:
|
||||
mse-network:
|
||||
external:
|
||||
name: mse_default
|
|
@ -0,0 +1,19 @@
|
|||
CREATE DATABASE IF NOT EXISTS remote;
|
||||
GRANT ALL PRIVILEGES ON remote.* TO 'myuser'@'%' IDENTIFIED BY 'remote';
|
||||
GRANT ALL PRIVILEGES ON remote.* TO 'myuser'@'localhost' IDENTIFIED BY 'remote';
|
||||
|
||||
DROP TABLE IF EXISTS USER;
|
||||
CREATE TABLE USER (
|
||||
lastname varchar(255) NOT NULL,
|
||||
firstname varchar(255) NOT NULL,
|
||||
email varchar(255) NOT NULL,
|
||||
password varchar(255) NOT NULL,
|
||||
random varchar(255) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
INSERT INTO USER VALUES (
|
||||
'John', 'locke', 'j.locke@mse.cadoles.com', '$2y$10$f8SevJVlAx8pnjrIK5OGruKGJdC95avev8CueEH8i8WcYb32r1H9m', 'phrase random'
|
||||
),(
|
||||
'md', 'cinq', 'md5@cadoles.com', '098f6bcd4621d373cade4e832627b4f6', 'un truc'
|
||||
),(
|
||||
'sha', 'one', 'shaone@cadoles.com', 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 'un autre truc'
|
||||
);
|
Loading…
Reference in New Issue