fix some permission issues
This commit is contained in:
@@ -39,7 +39,7 @@ RUN wget https://github.com/rommapp/romm/archive/refs/tags/$VERSION.tar.gz && \
|
|||||||
tar xfz $VERSION.tar.gz --strip-components=1 -C /app/code && rm $VERSION.tar.gz
|
tar xfz $VERSION.tar.gz --strip-components=1 -C /app/code && rm $VERSION.tar.gz
|
||||||
|
|
||||||
# Install nvm
|
# Install nvm
|
||||||
ENV NVM_DIR="/root/.nvm"
|
ENV NVM_DIR="/app/code/.nvm"
|
||||||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
|
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
|
||||||
&& . "$NVM_DIR/nvm.sh" \
|
&& . "$NVM_DIR/nvm.sh" \
|
||||||
&& nvm install 18.20.8 \
|
&& nvm install 18.20.8 \
|
||||||
@@ -56,12 +56,13 @@ RUN sed -i '22a #include <ctime>' ./src/Util.h \
|
|||||||
./src/libchdr/deps/zlib-1.3.1/gzread.c \
|
./src/libchdr/deps/zlib-1.3.1/gzread.c \
|
||||||
./src/libchdr/deps/zlib-1.3.1/gzwrite.c \
|
./src/libchdr/deps/zlib-1.3.1/gzwrite.c \
|
||||||
&& make HAVE_CHD=1 -f ./Makefile.RAHasher \
|
&& make HAVE_CHD=1 -f ./Makefile.RAHasher \
|
||||||
&& cp ./bin64/RAHasher /usr/bin/RAHasher
|
&& cp ./bin64/RAHasher /app/code/.bin/RAHasher
|
||||||
RUN rm -rf /tmp/RALibretro
|
RUN rm -rf /tmp/RALibretro
|
||||||
|
|
||||||
# Install frontend dependencies
|
# Install frontend dependencies
|
||||||
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
|
||||||
|
|
||||||
WORKDIR /app/code/
|
WORKDIR /app/code/
|
||||||
# Install uv for the non-root user
|
# Install uv for the non-root user
|
||||||
@@ -77,7 +78,7 @@ RUN uv sync --all-extras
|
|||||||
ADD supervisor/* /etc/supervisor/conf.d/
|
ADD supervisor/* /etc/supervisor/conf.d/
|
||||||
RUN ln -sf /run/supervisord.log /var/log/supervisor/supervisord.log
|
RUN ln -sf /run/supervisord.log /var/log/supervisor/supervisord.log
|
||||||
|
|
||||||
ENV PATH="/app/code/.venv/bin:${PATH}"
|
ENV PATH="/app/code/.venv/bin:/app/code/.bin:${PATH}"
|
||||||
|
|
||||||
COPY start.sh /app/pkg/
|
COPY start.sh /app/pkg/
|
||||||
|
|
||||||
|
|||||||
2
start.sh
2
start.sh
@@ -2,6 +2,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
mkdir -p /app/data/library /app/data/config /app/data/assets /app/data/resources
|
mkdir -p /app/data/library /app/data/config /app/data/assets /app/data/resources
|
||||||
|
mkdir -p /tmp/vite-temp
|
||||||
|
|
||||||
# ensure that data directory is owned by 'cloudron' user
|
# ensure that data directory is owned by 'cloudron' user
|
||||||
chown -R cloudron:cloudron /app/data
|
chown -R cloudron:cloudron /app/data
|
||||||
@@ -25,6 +26,7 @@ export OIDC_CLIENT_ID=${CLOUDRON_OIDC_CLIENT_ID}
|
|||||||
export OIDC_CLIENT_SECRET=${CLOUDRON_OIDC_CLIENT_SECRET}
|
export OIDC_CLIENT_SECRET=${CLOUDRON_OIDC_CLIENT_SECRET}
|
||||||
export OIDC_REDIRECT_URI="/api/oauth/openid"
|
export OIDC_REDIRECT_URI="/api/oauth/openid"
|
||||||
export OIDC_SERVER_APPLICATION_URL=${CLOUDRON_OIDC_AUTH_ENDPOINT}
|
export OIDC_SERVER_APPLICATION_URL=${CLOUDRON_OIDC_AUTH_ENDPOINT}
|
||||||
|
export ROMM_BASE_PATH=/app/data
|
||||||
|
|
||||||
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,7 @@
|
|||||||
priority=5
|
priority=5
|
||||||
directory=/app/code/frontend
|
directory=/app/code/frontend
|
||||||
environment=HOME=/app/code
|
environment=HOME=/app/code
|
||||||
command=npm run prod
|
command=npm run dev
|
||||||
user=cloudron
|
user=cloudron
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
|
|||||||
Reference in New Issue
Block a user