Fix readonly filesystem issues - use bind mount for storage and .env in /app/data
This commit is contained in:
@@ -55,6 +55,10 @@ RUN cd /app/code && \
|
||||
rm -rf node_modules && \
|
||||
chown -R cloudron:cloudron /app/code/public
|
||||
|
||||
# Remove storage directory as it will be mounted from /run
|
||||
RUN rm -rf /app/code/storage && \
|
||||
mkdir -p /app/code/storage
|
||||
|
||||
# Copy configuration files
|
||||
COPY nginx.conf /etc/nginx/sites-available/default
|
||||
COPY supervisor.conf /etc/supervisor/conf.d/anonaddy.conf
|
||||
@@ -80,9 +84,11 @@ RUN mkdir -p /tmp/data && \
|
||||
# Set permissions
|
||||
RUN chmod +x /app/code/start.sh && \
|
||||
chown -R cloudron:cloudron /app/code && \
|
||||
chmod -R 755 /app/code/storage && \
|
||||
chmod -R 755 /app/code/bootstrap/cache
|
||||
|
||||
# Create volume mount points for writable directories
|
||||
VOLUME ["/app/data", "/run", "/tmp"]
|
||||
|
||||
# Configure PHP-FPM to run as cloudron user
|
||||
RUN sed -i 's/user = www-data/user = cloudron/g' /etc/php/8.3/fpm/pool.d/www.conf && \
|
||||
sed -i 's/group = www-data/group = cloudron/g' /etc/php/8.3/fpm/pool.d/www.conf && \
|
||||
|
||||
Reference in New Issue
Block a user