Compare commits

..

3 Commits

Author SHA1 Message Date
Michael Green
1672520a29 Expand the platform table name field to accomodate larger platform names (#397)
IGDB has recently added a new platform who's name exceeds 45 characters
(the maximum Name length in the Platform table). This change extends the
character length to 255 chars.
2024-07-17 23:13:06 +10:00
Michael Green
3366d926f4 Unraid compatible single container docker image (#390)
See https://github.com/gaseous-project/unraid-template for an Unraid XML
template.
2024-07-12 15:43:02 +10:00
Michael Green
6d7f6f63c6 Resolved an error in the new logging cleanup (#389) 2024-07-10 11:53:37 +10:00
8 changed files with 44 additions and 18 deletions

View File

@@ -27,10 +27,19 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
- name: Build and push standard image
uses: docker/build-push-action@v6
with:
context: .
file: ./build/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: gaseousgames/test:latest
- name: Build and push image with embedded mariadb
uses: docker/build-push-action@v6
with:
context: .
file: ./build/Dockerfile-EmbeddedDB
platforms: linux/amd64,linux/arm64
push: true
tags: gaseousgames/test:latest-embeddeddb

View File

@@ -3,10 +3,11 @@
# create the user
echo "Creating user gaseous with UID ${PUID} and GID ${PGID}"
groupadd -g ${PGID} gaseous
useradd -u ${PUID} -g ${PGID} -m gaseous -G sudo
useradd -u ${PUID} -g ${PGID} -m gaseous -d /home/gaseous -G sudo
usermod -p "*" gaseous
mkdir -p /home/gaseous/.gaseous-server /var/lib/mysql
chown -R ${PUID}:${PGID} /App /home/gaseous/.gaseous-server /var/lib/mysql /run/mysqld
mkdir -p /home/gaseous/.gaseous-server /var/lib/mysql /var/log/mariadb /run/mysqld
chown -R ${PUID} /App /home/gaseous/.gaseous-server /var/lib/mysql /var/log/mariadb /run/mysqld
chgrp -R ${PGID} /App /home/gaseous/.gaseous-server /var/lib/mysql /var/log/mariadb /run/mysqld
# Start supervisord and services
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf

View File

@@ -1,5 +1,8 @@
#!/bin/sh
# install the database
/usr/bin/mariadb-install-db --datadir=/var/lib/mysql --user=gaseous
# start the database server without network or grant tables
/usr/sbin/mariadbd --datadir=/var/lib/mysql --skip-grant-tables --skip-networking &
@@ -7,7 +10,7 @@
sleep 5
# change the root password
mariadb -u root -e "FLUSH PRIVILEGES; ALTER USER 'root'@'localhost' IDENTIFIED BY '$MARIADB_ROOT_PASSWORD'; FLUSH PRIVILEGES;"
mariadb -u root -e "FLUSH PRIVILEGES; ALTER USER 'root'@'localhost' IDENTIFIED BY '$MARIADB_ROOT_PASSWORD'; ALTER USER 'gaseous'@'localhost' IDENTIFIED BY '$MARIADB_ROOT_PASSWORD'; FLUSH PRIVILEGES; SHUTDOWN;"
# stop the server
sleep 5

View File

@@ -1,4 +1,5 @@
[supervisord]
user=root
nodaemon=true
logfile=/var/log/supervisord/supervisord.log
logfile_maxbytes=50
@@ -28,6 +29,7 @@ stdout_logfile_maxbytes=0
[program:gaseous-server]
user=gaseous
command=dotnet /App/gaseous-server.dll
environment=HOME="/home/gaseous",USER="gaseous"
autostart=true
autorestart=true
redirect_stderr=true

View File

@@ -38,10 +38,10 @@ namespace gaseous_server.Classes
long deletedCount = 1;
long deletedEventCount = 0;
long maxLoops = 1000;
while (deletedCount > 0)
{
sql = "DELETE FROM ServerLogs WHERE EventTime < @EventRetentionDate LIMIT 1000; SELECT ROW_COUNT() AS Count;";
dbDict.Add("EventRetentionDate", DateTime.UtcNow.AddDays(Config.LoggingConfiguration.LogRetention * -1));
while (deletedCount > 0)
{
DataTable deletedCountTable = db.ExecuteCMD(sql, dbDict);
deletedCount = (long)deletedCountTable.Rows[0][0];
deletedEventCount += deletedCount;

View File

@@ -0,0 +1 @@
ALTER TABLE `Platform` CHANGE `Name` `Name` varchar(255);

View File

@@ -64,6 +64,7 @@
<None Remove="Support\Database\MySQL\gaseous-1019.sql" />
<None Remove="Support\Database\MySQL\gaseous-1020.sql" />
<None Remove="Support\Database\MySQL\gaseous-1021.sql" />
<None Remove="Support\Database\MySQL\gaseous-1022.sql" />
<None Remove="Classes\Metadata\" />
</ItemGroup>
<ItemGroup>
@@ -108,5 +109,6 @@
<EmbeddedResource Include="Support\Database\MySQL\gaseous-1019.sql" />
<EmbeddedResource Include="Support\Database\MySQL\gaseous-1020.sql" />
<EmbeddedResource Include="Support\Database\MySQL\gaseous-1021.sql" />
<EmbeddedResource Include="Support\Database\MySQL\gaseous-1022.sql" />
</ItemGroup>
</Project>

View File

@@ -5,15 +5,17 @@
<table style="width: 100%;">
<tr>
<th style="width: 20%;">Home Page</th>
<td><a href="https://github.com/gaseous-project/gaseous-server" class="romlink">https://github.com/gaseous-project/gaseous-server</a></td>
<td><a href="https://github.com/gaseous-project/gaseous-server"
class="romlink">https://github.com/gaseous-project/gaseous-server</a></td>
<td rowspan="5" style="text-align: center; width: 128px;">
<img src="/images/logo.png" style="display: block; margin: 20px auto; width: 100px;" />
<span style="display: block;">The Gaseous logo was designed by Tom2.0</span>
<span style="display: block;">The Gaseous logo was designed by Tom1243</span>
</td>
</tr>
<tr>
<th>Bugs and Feature Requests</th>
<td><a href="https://github.com/gaseous-project/gaseous-server/issues" class="romlink">https://github.com/gaseous-project/gaseous-server/issues</a></td>
<td><a href="https://github.com/gaseous-project/gaseous-server/issues"
class="romlink">https://github.com/gaseous-project/gaseous-server/issues</a></td>
</tr>
<tr>
<th>Join our Discord</th>
@@ -33,10 +35,12 @@
</td>
</tr>
<tr>
<td style="text-align: center;"><a href="https://github.com/EmulatorJS/EmulatorJS" target="_blank"><img src="/images/EmulatorJS.png" style="height: 36px;" /></a></td>
<td style="text-align: center;"><a href="https://github.com/EmulatorJS/EmulatorJS" target="_blank"><img
src="/images/EmulatorJS.png" style="height: 36px;" /></a></td>
<td colspan="3">
The EmulatorJS Project<br />
<a href="https://github.com/EmulatorJS/EmulatorJS" target="_blank" class="romlink">https://github.com/EmulatorJS/EmulatorJS</a>
<a href="https://github.com/EmulatorJS/EmulatorJS" target="_blank"
class="romlink">https://github.com/EmulatorJS/EmulatorJS</a>
</td>
</tr>
<tr>
@@ -47,7 +51,8 @@
</tr>
<tr>
<td style="text-align: center;">
<a href="https://www.igdb.com/" target="_blank"><img src="/images/IGDB_logo.svg" style="filter: invert(100%); height: 36px;" /></a>
<a href="https://www.igdb.com/" target="_blank"><img src="/images/IGDB_logo.svg"
style="filter: invert(100%); height: 36px;" /></a>
</td>
<td colspan="2">
The Internet Game Database<br />
@@ -61,7 +66,8 @@
</tr>
<tr>
<td style="text-align: center;">
<a href="https://www.tosecdev.org/" target="_blank"><img src="/images/TOSEC_logo.gif" style="height: 36px;" /></a>
<a href="https://www.tosecdev.org/" target="_blank"><img src="/images/TOSEC_logo.gif"
style="height: 36px;" /></a>
</td>
<td colspan="2">
The Old School Emulation Center<br />
@@ -70,11 +76,13 @@
</tr>
<tr>
<td style="text-align: center;">
<a href="https://www.progettosnaps.net/index.php" target="_blank"><img src="/images/ProgettoSnaps.gif" style="height: 36px;" /></a>
<a href="https://www.progettosnaps.net/index.php" target="_blank"><img src="/images/ProgettoSnaps.gif"
style="height: 36px;" /></a>
</td>
<td colspan="2">
Progetto-Snaps<br />
<a href="https://www.progettosnaps.net/index.php" target="_blank" class="romlink">https://www.progettosnaps.net/index.php</a>
<a href="https://www.progettosnaps.net/index.php" target="_blank"
class="romlink">https://www.progettosnaps.net/index.php</a>
</td>
</tr>
</table>