-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All images now support rootless (#418)
- Loading branch information
1 parent
f0783fc
commit 7dfb0b5
Showing
16 changed files
with
276 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
# create the user | ||
echo "Creating user gaseous with UID ${PUID} and GID ${PGID}" | ||
groupadd -g ${PGID} gaseous | ||
useradd -u ${PUID} -g ${PGID} -m gaseous -d /home/gaseous -G sudo | ||
usermod -p "*" gaseous | ||
mkdir -p /home/gaseous/.gaseous-server | ||
chown -R ${PUID} /App /home/gaseous/.gaseous-server | ||
chgrp -R ${PGID} /App /home/gaseous/.gaseous-server | ||
|
||
# Set MariaDB permissions | ||
mkdir -p /var/lib/mysql /var/log/mariadb /run/mysqld | ||
chown -R ${PUID} /var/lib/mysql /var/log/mariadb /run/mysqld | ||
chgrp -R ${PGID} /var/lib/mysql /var/log/mariadb /run/mysqld | ||
|
||
# Start supervisord and services | ||
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
# install the database | ||
echo "Installing MariaDB" | ||
/usr/bin/mariadb-install-db --datadir=/var/lib/mysql --user=gaseous | ||
|
||
# start the database server without network or grant tables | ||
echo "Starting MariaDB" | ||
/usr/sbin/mariadbd --datadir=/var/lib/mysql --skip-grant-tables --skip-networking & | ||
|
||
# wait for the server to start | ||
sleep 5 | ||
|
||
# change the root password | ||
echo "Setting MariaDB root password" | ||
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 | ||
echo "Stopping MariaDB" | ||
killall mariadbd | ||
|
||
# start the server normally | ||
echo "Starting MariaDB" | ||
/usr/sbin/mariadbd --datadir=/var/lib/mysql --user=gaseous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[supervisord] | ||
user=root | ||
nodaemon=true | ||
logfile=/var/log/supervisord/supervisord.log | ||
logfile_maxbytes=50 | ||
logfile_backups=5 | ||
pidfile=/var/run/supervisord/supervisord.pid | ||
loglevel = info | ||
|
||
[unix_http_server] | ||
file=/var/run/supervisord/supervisor.sock | ||
chmod=0700 | ||
|
||
[rpcinterface:supervisor] | ||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | ||
|
||
[supervisorctl] | ||
serverurl=unix:///var/run/supervisord/supervisor.sock | ||
|
||
[program:mariadb] | ||
user=gaseous | ||
command=bash -c "/usr/sbin/start-mariadb.sh" | ||
autostart=true | ||
autorestart=true | ||
redirect_stderr=true | ||
stdout_logfile=/dev/fd/1 | ||
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 | ||
stdout_logfile=/dev/fd/1 | ||
stdout_logfile_maxbytes=0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
# create the user | ||
echo "Creating user gaseous with UID ${PUID} and GID ${PGID}" | ||
groupadd -g ${PGID} gaseous | ||
useradd -u ${PUID} -g ${PGID} -m gaseous -d /home/gaseous -G sudo | ||
usermod -p "*" gaseous | ||
mkdir -p /home/gaseous/.gaseous-server | ||
chown -R ${PUID} /App /home/gaseous/.gaseous-server | ||
chgrp -R ${PGID} /App /home/gaseous/.gaseous-server | ||
|
||
# Start supervisord and services | ||
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[supervisord] | ||
user=root | ||
nodaemon=true | ||
logfile=/var/log/supervisord/supervisord.log | ||
logfile_maxbytes=50 | ||
logfile_backups=5 | ||
pidfile=/var/run/supervisord/supervisord.pid | ||
loglevel = info | ||
|
||
[unix_http_server] | ||
file=/var/run/supervisord/supervisor.sock | ||
chmod=0700 | ||
|
||
[rpcinterface:supervisor] | ||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | ||
|
||
[supervisorctl] | ||
serverurl=unix:///var/run/supervisord/supervisor.sock | ||
|
||
[program:gaseous-server] | ||
user=gaseous | ||
command=dotnet /App/gaseous-server.dll | ||
environment=HOME="/home/gaseous",USER="gaseous" | ||
autostart=true | ||
autorestart=true | ||
redirect_stderr=true | ||
stdout_logfile=/dev/fd/1 | ||
stdout_logfile_maxbytes=0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.