Compare commits
2 Commits
707aaeae15
...
571e449581
| Author | SHA1 | Date | |
|---|---|---|---|
| 571e449581 | |||
| 74db5b8b61 |
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"title": "Romm",
|
"title": "Romm",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
|
"upstreamVersion":"4.5.0",
|
||||||
"author":"Kevin Whitaker <kevin@eyecreate.org>",
|
"author":"Kevin Whitaker <kevin@eyecreate.org>",
|
||||||
"description":"A beautiful, powerful, self-hosted rom manager and player.",
|
"description":"A beautiful, powerful, self-hosted rom manager and player.",
|
||||||
"healthCheckPath": "/api/heartbeat",
|
"healthCheckPath": "/api/heartbeat",
|
||||||
@@ -18,5 +19,6 @@
|
|||||||
},
|
},
|
||||||
"website":"https://romm.app/",
|
"website":"https://romm.app/",
|
||||||
"icon":"file://logo.png",
|
"icon":"file://logo.png",
|
||||||
"manifestVersion": 2
|
"manifestVersion": 2,
|
||||||
|
"postInstallMessage":"Before setting up the first admin user, please check /app/data/env.sh for some API keys for metadata sources and fill in any you want to use. Put any ROMs in the /app/data/library/roms folder. Please see https://docs.romm.app/latest/Getting-Started/Folder-Structure/ for details on folder structure. RESTART AFTER ANY API KEY CHANGES!"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ RUN rm -rf /tmp/RALibretro
|
|||||||
WORKDIR /app/code/frontend
|
WORKDIR /app/code/frontend
|
||||||
RUN npm install
|
RUN npm install
|
||||||
RUN ln -s /tmp/vite-temp /app/code/frontend/node_modules/.vite-temp && ln -s /tmp/vite /app/code/frontend/node_modules/.vite && mkdir assets/romm && ln -s /app/data/assets /app/code/frontend/assets/romm/assets && ln -s /app/data/resources /app/code/frontend/assets/romm/resources
|
RUN ln -s /tmp/vite-temp /app/code/frontend/node_modules/.vite-temp && ln -s /tmp/vite /app/code/frontend/node_modules/.vite && mkdir assets/romm && ln -s /app/data/assets /app/code/frontend/assets/romm/assets && ln -s /app/data/resources /app/code/frontend/assets/romm/resources
|
||||||
|
COPY --from=docker.io/rommapp/romm:$VERSION /var/www/html/assets/emulatorjs /app/code/frontend/assets/emulatorjs
|
||||||
|
COPY --from=docker.io/rommapp/romm:$VERSION /var/www/html/assets/ruffle /app/code/frontend/assets/ruffle
|
||||||
|
|
||||||
WORKDIR /app/code/
|
WORKDIR /app/code/
|
||||||
# Install uv for the non-root user
|
# Install uv for the non-root user
|
||||||
@@ -83,6 +85,7 @@ RUN ln -sf /run/supervisord.log /var/log/supervisor/supervisord.log
|
|||||||
ENV PATH="/app/code/.venv/bin:${PATH}"
|
ENV PATH="/app/code/.venv/bin:${PATH}"
|
||||||
|
|
||||||
COPY start.sh /app/pkg/
|
COPY start.sh /app/pkg/
|
||||||
|
COPY env.sh.template /app/pkg/
|
||||||
|
|
||||||
CMD [ "/app/pkg/start.sh" ]
|
CMD [ "/app/pkg/start.sh" ]
|
||||||
|
|
||||||
|
|||||||
13
env.sh.template
Normal file
13
env.sh.template
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
export IGDB_CLIENT_ID=
|
||||||
|
export IGDB_CLIENT_SECRET=
|
||||||
|
export MOBYGAMES_API_KEY=
|
||||||
|
export STEAMGRIDDB_API_KEY=
|
||||||
|
export RETROACHIEVEMENTS_API_KEY=
|
||||||
|
export SCREENSCRAPER_USER=
|
||||||
|
export SCREENSCRAPER_PASSWORD=
|
||||||
|
export HASHEOUS_API_ENABLED=true
|
||||||
|
export OIDC_ENABLED=true
|
||||||
28
start.sh
28
start.sh
@@ -17,12 +17,6 @@ export DB_PORT=${CLOUDRON_POSTGRESQL_PORT}
|
|||||||
export DB_NAME=${CLOUDRON_POSTGRESQL_DATABASE}
|
export DB_NAME=${CLOUDRON_POSTGRESQL_DATABASE}
|
||||||
export DB_USER=${CLOUDRON_POSTGRESQL_USERNAME}
|
export DB_USER=${CLOUDRON_POSTGRESQL_USERNAME}
|
||||||
export DB_PASSWD=${CLOUDRON_POSTGRESQL_PASSWORD}
|
export DB_PASSWD=${CLOUDRON_POSTGRESQL_PASSWORD}
|
||||||
export ROMM_AUTH_SECRET_KEY=$(/usr/bin/openssl rand -hex 32)
|
|
||||||
export IGDB_CLIENT_ID=
|
|
||||||
export IGDB_CLIENT_SECRET=
|
|
||||||
export MOBYGAMES_API_KEY=
|
|
||||||
export STEAMGRIDDB_API_KEY=
|
|
||||||
export OIDC_ENABLED=true
|
|
||||||
export OIDC_PROVIDER=${CLOUDRON_OIDC_PROVIDER_NAME}
|
export OIDC_PROVIDER=${CLOUDRON_OIDC_PROVIDER_NAME}
|
||||||
export OIDC_CLIENT_ID=${CLOUDRON_OIDC_CLIENT_ID}
|
export OIDC_CLIENT_ID=${CLOUDRON_OIDC_CLIENT_ID}
|
||||||
export OIDC_CLIENT_SECRET=${CLOUDRON_OIDC_CLIENT_SECRET}
|
export OIDC_CLIENT_SECRET=${CLOUDRON_OIDC_CLIENT_SECRET}
|
||||||
@@ -34,6 +28,28 @@ export __VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=${CLOUDRON_APP_DOMAIN}
|
|||||||
export XDG_CACHE_HOME=/tmp/cache
|
export XDG_CACHE_HOME=/tmp/cache
|
||||||
export REDIS_HOST=${CLOUDRON_REDIS_HOST}
|
export REDIS_HOST=${CLOUDRON_REDIS_HOST}
|
||||||
export REDIS_PORT=${CLOUDRON_REDIS_PORT}
|
export REDIS_PORT=${CLOUDRON_REDIS_PORT}
|
||||||
|
export ROMM_BASE_PATH=/app/data
|
||||||
|
|
||||||
|
TEMPLATE_FILE="/app/pkg/env.sh.template"
|
||||||
|
ENV_FILE="/app/data/env.sh"
|
||||||
|
|
||||||
|
# Check if env.sh exists in /app/data
|
||||||
|
if [ -f "$ENV_FILE" ]; then
|
||||||
|
echo "env.sh already exists in $ENV_FILE"
|
||||||
|
else
|
||||||
|
# Copy the template to the target location
|
||||||
|
echo "Copying $TEMPLATE_FILE to $ENV_FILE"
|
||||||
|
cp "$TEMPLATE_FILE" "$ENV_FILE"
|
||||||
|
chmod +x "$ENV_FILE"
|
||||||
|
|
||||||
|
# Generate a new secret key using openssl
|
||||||
|
SECRET_KEY=$(openssl rand -hex 32 2>/dev/null)
|
||||||
|
echo "export ROMM_AUTH_SECRET_KEY=$SECRET_KEY" >> "$ENV_FILE"
|
||||||
|
|
||||||
|
echo "Successfully created $ENV_FILE from template"
|
||||||
|
fi
|
||||||
|
|
||||||
|
source /app/data/env.sh
|
||||||
|
|
||||||
echo "==> Starting supervisor"
|
echo "==> Starting supervisor"
|
||||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Romm
|
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Romm
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
priority=5
|
priority=5
|
||||||
directory=/app/code/backend
|
directory=/app/code/backend
|
||||||
environment=HOME=/app/code
|
environment=HOME=/app/code
|
||||||
environment=ROMM_BASE_PATH=/app/data
|
|
||||||
command=uv run python main.py
|
command=uv run python main.py
|
||||||
user=cloudron
|
user=cloudron
|
||||||
autostart=true
|
autostart=true
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[program:frontend]
|
[program:frontend]
|
||||||
priority=5
|
priority=50
|
||||||
directory=/app/code/frontend
|
directory=/app/code/frontend
|
||||||
environment=HOME=/app/code
|
environment=HOME=/app/code
|
||||||
command=npm run dev
|
command=npm run dev
|
||||||
|
|||||||
13
supervisor/rq.conf
Normal file
13
supervisor/rq.conf
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[program:rq]
|
||||||
|
priority=10
|
||||||
|
directory=/app/code/backend
|
||||||
|
environment=HOME=/app/code
|
||||||
|
environment=PYTHONPATH="/app/code/backend:${PYTHONPATH-}"
|
||||||
|
command=uv run rq worker --path /app/code/backend --pid /tmp/rq_worker.pid --url "redis://%(ENV_REDIS_HOST)s:%(ENV_REDIS_PORT)s/0" high default low
|
||||||
|
user=cloudron
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
12
supervisor/rqscheduler.conf
Normal file
12
supervisor/rqscheduler.conf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[program:rqscheduler]
|
||||||
|
priority=10
|
||||||
|
directory=/app/code/backend
|
||||||
|
environment=HOME=/app/code
|
||||||
|
command=uv run rqscheduler --host %(ENV_REDIS_HOST)s --port %(ENV_REDIS_PORT)s --db 0 --path /app/code.backend --pid /tmp/rq_scheduler.pid
|
||||||
|
user=cloudron
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
12
supervisor/watcher.conf
Normal file
12
supervisor/watcher.conf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[program:watcher]
|
||||||
|
priority=20
|
||||||
|
directory=/app/code/backend
|
||||||
|
environment=HOME=/app/code
|
||||||
|
command=uv run watchfiles --target-type command 'uv run python watcher.py' /app/data/library
|
||||||
|
user=cloudron
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
Reference in New Issue
Block a user