Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
.git/
.github/
.env*
vendor/
Dockerfile*
info.php
compose*
compose.*
README.md
.dockerignore
.gitattributes
.gitignore
debug.sh
38 changes: 22 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
FROM php:8-apache

# Install system dependencies
RUN apt-get update && \
apt-get install -y \
zlib1g-dev

RUN apt-get install -y \
libxml2-dev

zlib1g-dev \
libxml2-dev \
libssl-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
unzip \
git

# Install PHP extensions
RUN /usr/local/bin/docker-php-ext-install mysqli pdo pdo_mysql
RUN apt-get install libssl-dev -y

ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0"

ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions gd

RUN apt-get update && apt-get install -y \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Apache configuration
COPY docker/000-default.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite

# Application setup
COPY . /var/www/
WORKDIR /var/www

# Install dependencies, then delete Composer files
RUN composer install --no-interaction --no-dev --optimize-autoloader
RUN rm composer.*

RUN chown -R www-data:www-data /var/www

COPY docker/start-apache /usr/local/bin

ENV APP_PATH=/var/www

CMD ["start-apache"]
CMD ["start-apache"]
22 changes: 0 additions & 22 deletions Dockerfile.debug

This file was deleted.

2 changes: 1 addition & 1 deletion compose.debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
container_name: bivieh_devmarkt_dev
build:
context: .
dockerfile: Dockerfile.debug
dockerfile: debug.Dockerfile
ports:
- "8080:80"
volumes:
Expand Down
43 changes: 43 additions & 0 deletions debug.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM php:8-apache

# Install system dependencies
RUN apt-get update && \
apt-get install -y \
zlib1g-dev \
libxml2-dev \
libssl-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
unzip \
git

# Install PHP extensions
RUN /usr/local/bin/docker-php-ext-install mysqli pdo pdo_mysql

ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions gd

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Apache configuration
COPY docker/000-default.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite

# Application setup
COPY . /var/www/
WORKDIR /var/www

# Install dependencies (including dev for debug mode), then delete Composer files
RUN composer install --no-interaction
RUN rm composer.*

RUN chown -R www-data:www-data /var/www

COPY docker/start-apache /usr/local/bin

ENV APP_PATH=/var/www

CMD ["start-apache"]
2 changes: 1 addition & 1 deletion debug.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker-compose -f compose.debug.yaml up
docker-compose -f compose.debug.yaml up --build
Loading