diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5ce517b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +.git +.gitignore +.dockerignore +node_modules +screenshots +test + diff --git a/CloudronManifest.json b/CloudronManifest.json index 557a2e2..1999095 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -3,20 +3,20 @@ "version": "0.1.0", "author":"Kevin Whitaker ", "description":"A beautiful, powerful, self-hosted rom manager and player.", - "healthCheckPath": "/", + "healthCheckPath": "/api/heartbeat", "httpPort": 3000, - "memoryLimit": 1048576000, + "memoryLimit": 2097152000, "addons": { "localstorage": {}, "postgresql": {}, "oidc": { "loginRedirectUri": "/api/oauth/openid", - "logoutRedirectUri": "/", + "logoutRedirectUri": "/login", "tokenSignatureAlgorithm": "RS256" }, "redis": { "noPassword": true } }, "website":"https://romm.app/", - "icon":"file://icon.png", + "icon":"file://logo.png", "manifestVersion": 2 } diff --git a/Dockerfile b/Dockerfile index 7e54746..b9510a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,7 +63,7 @@ RUN rm -rf /tmp/RALibretro # Install frontend dependencies 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 +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 WORKDIR /app/code/ # Install uv for the non-root user diff --git a/start.sh b/start.sh index d84cbec..067ff75 100755 --- a/start.sh +++ b/start.sh @@ -4,6 +4,8 @@ set -eu mkdir -p /app/data/library /app/data/config /app/data/assets /app/data/resources mkdir -p /tmp/vite-temp /tmp/vite /tmp/cache +touch /app/data/config/config.yml + # ensure that data directory is owned by 'cloudron' user chown -R cloudron:cloudron /app/data /tmp/vite-temp /tmp/vite /tmp/cache @@ -24,9 +26,8 @@ export OIDC_ENABLED=true export OIDC_PROVIDER=${CLOUDRON_OIDC_PROVIDER_NAME} export OIDC_CLIENT_ID=${CLOUDRON_OIDC_CLIENT_ID} export OIDC_CLIENT_SECRET=${CLOUDRON_OIDC_CLIENT_SECRET} -export OIDC_REDIRECT_URI="/api/oauth/openid" -export OIDC_SERVER_APPLICATION_URL=${CLOUDRON_OIDC_AUTH_ENDPOINT} -export ROMM_BASE_PATH=/app/data +export OIDC_REDIRECT_URI="${CLOUDRON_APP_ORIGIN}/api/oauth/openid" +export OIDC_SERVER_APPLICATION_URL=${CLOUDRON_OIDC_ISSUER} export UV_PYTHON_INSTALL_DIR=/app/code/uv export DEV_HTTPS=false export __VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=${CLOUDRON_APP_DOMAIN} diff --git a/supervisor/backend.conf b/supervisor/backend.conf index 25fe984..e7bd797 100644 --- a/supervisor/backend.conf +++ b/supervisor/backend.conf @@ -2,6 +2,7 @@ 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 f5ec3c9..abe79d9 100644 --- a/supervisor/frontend.conf +++ b/supervisor/frontend.conf @@ -1,4 +1,4 @@ -[program:backend] +[program:frontend] priority=5 directory=/app/code/frontend environment=HOME=/app/code