Add missing docker-mysql.yml (#3826)

This commit is contained in:
jekkos
2023-12-24 10:17:58 +01:00
committed by jekkos
parent 33a6356cc4
commit 245dcd2dd1
2 changed files with 50 additions and 0 deletions

30
docker/docker-mysql.yml Normal file
View File

@@ -0,0 +1,30 @@
version: '2'
volumes:
uploads:
driver: local
logs:
driver: local
mysql:
driver: local
networks:
app_net:
services:
mysql:
image: mariadb:10.5
container_name: mysql
restart: always
expose:
- "3306"
networks:
- app_net
volumes:
- ./app/Database:/docker-entrypoint-initdb.d
- mysql:/var/lib/mysql:rw
environment:
- MYSQL_ROOT_PASSWORD=pointofsale
- MYSQL_DATABASE=ospos
- MYSQL_USER=admin
- MYSQL_PASSWORD=pointofsale

20
tools/rewrite-history.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
$fp = fopen("/root/commits.txt", "r");
$commits = array();
$previous_author = '';
while (($line = fgets($fp)) !== FALSE) {
list($mode, $sha, $current_author, $subject) = explode('|', $line);
if ($previous_author == '' || $previous_author !== $current_author) {
$previous_author = $current_author;
}
else {
$mode = 'f';
}
$output[] = implode(' ', array($mode, $sha, $subject));
}
fclose($fp);
print implode(' ', $output);