diff --git a/CloudronManifest.json b/CloudronManifest.json index a00008d..eb00b29 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -20,5 +20,5 @@ "website":"https://romm.app/", "icon":"file://logo.png", "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." + "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!" } diff --git a/Dockerfile b/Dockerfile index 01066ee..7ea088e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,8 @@ RUN rm -rf /tmp/RALibretro WORKDIR /app/code/frontend 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 +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/ # Install uv for the non-root user diff --git a/start.sh b/start.sh index 193b340..71c1ea0 100755 --- a/start.sh +++ b/start.sh @@ -28,6 +28,7 @@ export __VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=${CLOUDRON_APP_DOMAIN} export XDG_CACHE_HOME=/tmp/cache export REDIS_HOST=${CLOUDRON_REDIS_HOST} 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" diff --git a/supervisor/backend.conf b/supervisor/backend.conf index e7bd797..25fe984 100644 --- a/supervisor/backend.conf +++ b/supervisor/backend.conf @@ -2,7 +2,6 @@ priority=5 directory=/app/code/backend environment=HOME=/app/code -environment=ROMM_BASE_PATH=/app/data command=uv run python main.py user=cloudron autostart=true diff --git a/supervisor/frontend.conf b/supervisor/frontend.conf index abe79d9..0c7cc56 100644 --- a/supervisor/frontend.conf +++ b/supervisor/frontend.conf @@ -1,5 +1,5 @@ [program:frontend] -priority=5 +priority=50 directory=/app/code/frontend environment=HOME=/app/code command=npm run dev diff --git a/supervisor/rq.conf b/supervisor/rq.conf new file mode 100644 index 0000000..a08e56e --- /dev/null +++ b/supervisor/rq.conf @@ -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 diff --git a/supervisor/rqscheduler.conf b/supervisor/rqscheduler.conf new file mode 100644 index 0000000..cb45c22 --- /dev/null +++ b/supervisor/rqscheduler.conf @@ -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 diff --git a/supervisor/watcher.conf b/supervisor/watcher.conf new file mode 100644 index 0000000..d81a4f6 --- /dev/null +++ b/supervisor/watcher.conf @@ -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