Add containerization and improve economic invoice handling

Introduce Docker support with a Dockerfile and example docker-compose setup, enlisting services like MySQL and Redis. Enhance economic invoice drafts with support for dimensions while restructuring related logic and schemas for better maintenance and clarity.
This commit is contained in:
Jepp9350
2025-01-28 11:50:12 +01:00
parent f0747d1966
commit 0987140e61
7 changed files with 597 additions and 17 deletions
+44
View File
@@ -0,0 +1,44 @@
# Base image: PHP 8.2 with Apache
FROM php:8.2-apache
# Install necessary system dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
libonig-dev \
libpq-dev \
libzip-dev \
libcurl4-openssl-dev \
default-mysql-client \
redis-server \
&& docker-php-ext-install \
mysqli \
pdo \
pdo_mysql \
zip \
bcmath \
sockets
# Enable Apache mod_rewrite (required for web server routing)
RUN a2enmod rewrite
# Set working directory
WORKDIR /var/www/html
# Copy application code
COPY . /var/www/html
# Install Composer
COPY --from=composer:2.6 /usr/bin/composer /usr/bin/composer
# Install PHP dependencies through Composer
RUN composer install --no-dev --optimize-autoloader
# Set permissions for the web server
RUN chown -R www-data:www-data /var/www/html && chmod -R 755 /var/www/html
# Expose port 80 for HTTP traffic
EXPOSE 80
# Start Redis service when the container starts
CMD service redis-server start && apache2-foreground