docker image
This commit is contained in:
1 parent
6213cac146
commit
5ff1c0e389
4 files changed
+26
-18
No files matched your search
+14
-4
@@ -1,19 +1,29 @@
|
||||
FROM tobi312/php:8.4-apache
|
||||
FROM php:8.3-apache
|
||||
|
||||
# Install system dependencies and PHP extensions
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libsqlite3-dev \
|
||||
libzip-dev \
|
||||
unzip \
|
||||
&& docker-php-ext-install pdo_sqlite zip
|
||||
|
||||
# Set DocumentRoot
|
||||
ENV APACHE_DOCUMENT_ROOT /var/www/html
|
||||
ENV APACHE_DOCUMENT_ROOT=/var/www/html
|
||||
|
||||
# Copy application files
|
||||
COPY . /var/www/html
|
||||
|
||||
# Copy custom PHP configuration
|
||||
COPY /docker/php.ini /usr/local/etc/php/conf.d/php.ini
|
||||
|
||||
# Create data directories and set permissions
|
||||
RUN mkdir -p /var/www/html/data/database /var/www/html/data/images/custom /var/www/html/data/images/backgrounds && \
|
||||
chmod -R 775 /var/www/html/data
|
||||
|
||||
# Copy and set up entrypoint
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY /docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
# Expose port and start Apache
|
||||
EXPOSE 80
|
||||
|
||||
+1
-14
@@ -9,20 +9,7 @@ services:
|
||||
- .:/var/www/html:rw
|
||||
environment:
|
||||
TZ: "Europe/Amsterdam"
|
||||
PHP_ERRORS: 1
|
||||
PHP_MEM_LIMIT: 128
|
||||
PHP_POST_MAX_SIZE: 250
|
||||
PHP_UPLOAD_MAX_FILESIZE: 25
|
||||
PHP_MAX_FILE_UPLOADS: 20
|
||||
CREATE_PHPINFO_FILE: 0
|
||||
CREATE_INDEX_FILE: 0
|
||||
ENABLE_APACHE_REWRITE: 1
|
||||
ENABLE_APACHE_ACTIONS: 0
|
||||
ENABLE_APACHE_SSL: 0
|
||||
ENABLE_APACHE_HEADERS: 0
|
||||
ENABLE_APACHE_ALLOWOVERRIDE: 1
|
||||
ENABLE_APACHE_REMOTEIP: 0
|
||||
ENABLE_APACHE_STATUS: 0
|
||||
|
||||
# favicon-downloader:
|
||||
# ports:
|
||||
# - 3000:3000
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Set permissions on the data directory
|
||||
chown -R www-data:www-data /var/www/html/data
|
||||
chmod -R 775 /var/www/html/data
|
||||
|
||||
# Execute the CMD from the Dockerfile, or the command passed to `docker run`
|
||||
exec "$@"
|
||||
@@ -0,0 +1,2 @@
|
||||
upload_max_filesize = 100M
|
||||
post_max_size = 100M
|
||||
Reference in new issue
Block a user