Simplify directory creation

This commit is contained in:
2026-10-24 13:38:58 +03:00
parent dd635efdea
commit 66e1eab133
3 changed files with 9 additions and 7 deletions
-4
View File
@@ -16,10 +16,6 @@ RUN mkdir -p /usr/local/etc/php/conf.d && \
echo 'post_max_size = 100M' >> /usr/local/etc/php/conf.d/piwigo-custom.ini && \ echo 'post_max_size = 100M' >> /usr/local/etc/php/conf.d/piwigo-custom.ini && \
echo 'max_file_uploads = 50' >> /usr/local/etc/php/conf.d/piwigo-custom.ini echo 'max_file_uploads = 50' >> /usr/local/etc/php/conf.d/piwigo-custom.ini
# Create directory structure
RUN mkdir -p /var/www/html/upload /var/www/html/local/config /var/www/html/galleries \
&& chown -R www-data:www-data /var/www/html
# Copy custom entrypoint for restore support # Copy custom entrypoint for restore support
COPY docker-entrypoint.sh /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh RUN chmod +x /usr/local/bin/docker-entrypoint.sh
+7 -3
View File
@@ -11,17 +11,21 @@ cp .env.example .env
# 2. Edit .env with your database passwords # 2. Edit .env with your database passwords
nano .env nano .env
# 3. Place your backup data in ./piwigo-data/ # 3. Create data directory with correct permissions (UID 33 = www-data)
mkdir -p ./piwigo-data
chown -R 33:33 ./piwigo-data
# 4. Place your backup data in ./piwigo-data/
# Structure should be: # Structure should be:
# piwigo-data/ # piwigo-data/
# ├── upload/ # From backup uploads/ # ├── upload/ # From backup uploads/
# ├── local/config/ # From backup config/ # ├── local/config/ # From backup config/
# └── galleries/ # From backup galleries/ (if any) # └── galleries/ # From backup galleries/ (if any)
# 4. Start containers # 5. Start containers
docker-compose up -d docker-compose up -d
# 5. Access Piwigo at http://localhost:8080 # 6. Access Piwigo at http://localhost:8080
``` ```
## Directory Structure ## Directory Structure
+2
View File
@@ -37,6 +37,8 @@ services:
PHP_POST_MAX_SIZE: 100M PHP_POST_MAX_SIZE: 100M
volumes: volumes:
- ${PIWIGO_DATA_DIR:-./piwigo-data}:/var/www/html - ${PIWIGO_DATA_DIR:-./piwigo-data}:/var/www/html
# Ensure data directory exists with correct permissions
# Run: mkdir -p ./piwigo-data && chown -R 33:33 ./piwigo-data
ports: ports:
- "${PIWIGO_PORT:-8080}:80" - "${PIWIGO_PORT:-8080}:80"
networks: networks: