parent
c77aacb369
commit
383da75532
@ -0,0 +1,6 @@
|
||||
ACTUAL_ENV=dev
|
||||
DB_USER=root
|
||||
DB_PASSWORD=password
|
||||
DB_NAME=battleship
|
||||
DB_HOST=localhost
|
||||
COOKIE_SECRET_KEY=secret_key
|
@ -1,6 +1,5 @@
|
||||
node_modules/
|
||||
.vscode/
|
||||
.env
|
||||
nginx.conf
|
||||
nginx/
|
||||
secrets/
|
||||
|
@ -0,0 +1,6 @@
|
||||
body{
|
||||
background-image: url("../images/background.jpeg");
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Scores !</title>
|
||||
</head>
|
||||
<body>
|
||||
<span class="material-symbols-outlined">
|
||||
keyboard_double_arrow_right
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
source .env
|
||||
|
||||
TIMESTAMP=$(date +"%F")
|
||||
BACKUP_DIR="../maettleship_save"
|
||||
mkdir -p "$BACKUP_DIR/$TIMESTAMP"
|
||||
|
||||
if [ $ACTUAL_ENV = 'dev' ]; then
|
||||
docker exec -i mysql-maettleship mysqldump -u $DB_USER -p$DB_PASSWORD $DB_NAME > "$BACKUP_DIR/$TIMESTAMP/$DB_NAME.sql"
|
||||
else
|
||||
db_user_file=$(cat ./secrets/db_user.txt)
|
||||
db_password_file=$(cat ./secrets/db_password.txt)
|
||||
db_name_file=$(cat ./secrets/db_name.txt)
|
||||
docker exec -i mysql-maettleship mysqldump -u $db_user_file -p$db_password_file $db_name_file > "$BACKUP_DIR/$TIMESTAMP/$db_name_file.sql"
|
||||
fi
|
||||
|
||||
find "$BACKUP_DIR/" -type d -mtime +7 -exec rm -rf {} \;
|
Loading…
Reference in new issue