added dbs etup steps and update forgejo compose volumes

This commit is contained in:
admin 2026-02-05 08:18:36 -07:00
parent 6dde5dcfc7
commit 52106b2d80
2 changed files with 23 additions and 1 deletions

View file

@ -15,7 +15,7 @@ services:
- FORGEJO__server__SSH_PORT=2222
volumes:
- /mnt/git_data:/data
- /git_data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:

View file

@ -0,0 +1,22 @@
##login to the DB
mariadb -h 172.16.201.150 -u root -p
##initialize databses with usernames and passwords
##Forgjo Prod
CREATE DATABASE forgejo_prod CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'forgejo_prod'@'%' IDENTIFIED BY 'Prod_Password_123!';
GRANT ALL PRIVILEGES ON forgejo_prod.* TO 'forgejo_prod'@'%';
FLUSH PRIVILEGES;
##Forgjo Test
CREATE DATABASE forgejo_test CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'forgejo_test'@'%' IDENTIFIED BY 'Test_Password_456!';
GRANT ALL PRIVILEGES ON forgejo_test.* TO 'forgejo_test'@'%';
FLUSH PRIVILEGES;
##Forgjo Dev - with applied limits
CREATE DATABASE forgejo_test CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'forgejo_test'@'%' IDENTIFIED BY 'Test_Password_456!';
GRANT ALL PRIVILEGES ON forgejo_test.* TO 'forgejo_test'@'%';
FLUSH PRIVILEGES;