From d1c04cbea4b4c5f5b445fbfc4133192b44bcc10c Mon Sep 17 00:00:00 2001 From: Nathan Steel Date: Wed, 4 Jun 2025 11:43:03 +0100 Subject: [PATCH] Add sass compile script, and DB perms to compose --- db/schema.sql | 11 ++++++++--- sass-compile.sh | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 sass-compile.sh diff --git a/db/schema.sql b/db/schema.sql index ac24077..0cdf11c 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -1,20 +1,25 @@ -- Create a user (or more) CREATE OR REPLACE USER nathan@'%' IDENTIFIED BY 'password'; --- CREATE USER 'aLeaf'@'%' IDENTIFIED BY "aLeaf"; +CREATE USER 'aLeaf'@'%' IDENTIFIED BY "aLeaf"; -- Role admin, only they have permission to add others to their role CREATE OR REPLACE ROLE admin WITH ADMIN nathan@'%'; GRANT ALL ON *.* TO admin WITH GRANT OPTION; +-- GRANT ALL PRIVILEGES ON *.* TO admin WITH GRANT OPTION; --- GRANT ALL PRIVILEGES ON *.* TO 'aLeaf'@'%'; +CREATE DATABASE 'aNetwork'; +GRANT ALL PRIVILEGES ON 'aNetwork'.* TO 'aLeaf'@'%'; -- The user the website is using for access -- GRANT ALL PRIVILEGES ON *.* TO 'nathan'@'%' WITH GRANT OPTION; -- Priv, all of the belo -- GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON *.* TO 'username'@'localhost'; -- GRANT USAGE ON *.* TO 'nathan'@'%'; -- Allows usage of the tables I guess (default on create?) +-- https://stackoverflow.com/questions/64653778/why-are-not-working-my-roles-in-my-mysql-database +SET DEFAULT ROLE admin FOR nathan; -- https://mariadb.com/kb/en/set-default-role/ +-- SET ROLE ALL; FLUSH PRIVILEGES; --- Remove root, to prevent root login +-- Remove root, to prevent root login (security, yo) DROP USER root, root@localhost -- Create tables, and insert data into them diff --git a/sass-compile.sh b/sass-compile.sh new file mode 100644 index 0000000..433e5bf --- /dev/null +++ b/sass-compile.sh @@ -0,0 +1,3 @@ +sass --no-source-map --style compressed \ + --watch php/www/website/public/assets/aSkelly/scss:php/www/website/public/assets/aSkelly/css +