diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-17 12:12:22 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-17 12:12:22 +0300 |
| commit | 68fc9e55e538e03f94509731ab41a0c8cf96710f (patch) | |
| tree | 3edb1e81864ac3eb35ba0fe8087ed24da1b812bf /Dockerfile | |
| parent | 84b2da85a1b452922dadb6a609533b9945afe51d (diff) | |
| download | classroom-68fc9e55e538e03f94509731ab41a0c8cf96710f.tar.gz classroom-68fc9e55e538e03f94509731ab41a0c8cf96710f.tar.bz2 classroom-68fc9e55e538e03f94509731ab41a0c8cf96710f.zip | |
setup a real server environment (apache DocumentRoot=/var/www/public)
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -42,16 +42,17 @@ RUN docker-php-ext-install pdo pdo_mysql mysqli # ------------------------------------------------------------------------------ # Copy local code to the container image. -COPY html /var/www/html +COPY public /var/www/public # Copy core files behind public COPY core /var/www/core -# Copy configuration files for the container -COPY docker /var/www/docker +# Copy storage folder structure behind public +COPY storage /var/www/storage +# Copy configuration files for the container (application based) +COPY docker /var/www/docker COPY tests /var/www/tests - COPY composer.json /var/www/ @@ -76,8 +77,14 @@ RUN locale-gen # Manage permitions in specific directories # ------------------------------------------------------------------------------ +# (make local storage directories writable) # RUN chown -R www-data:www-data /var/www -RUN chmod -R 757 /var/www/html/cache +RUN chmod -R 757 /var/www/public/cache +RUN chmod -R 757 /var/www/storage + + +# change apache's default-root to /var/www/public +RUN sed -ri -e 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/*.conf # Use the PORT environment variable in Apache configuration files. |
