Skip to content
Closed
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
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM php:7.4-apache-buster

# Installing minimum system packages
RUN apt-get update && apt-get install -y \
libicu-dev \
unzip

# Installing minimum PHP extensions
RUN docker-php-ext-install \
intl \
mysqli \
pdo \
pdo_mysql

# Apache Configurations
ENV APACHE_DOCUMENT_ROOT /var/www/html/webroot
RUN a2enmod rewrite

# Installing composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

WORKDIR /var/www/html

COPY . .

RUN chmod +x /var/www/html/docker-entrypoint.sh

ENTRYPOINT ["/var/www/html/docker-entrypoint.sh"]
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3.7"
services:
app:
image: app
build:
context: ./
dockerfile: Dockerfile
ports:
- "80:80"
container_name: app
restart: unless-stopped
volumes:
- ./:/var/www/html
6 changes: 6 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
env >> /etc/environment
cd /var/www/html && composer install
exec apache2-foreground
touch /var/www/html/logs/error.log
tail -f /var/www/html/logs/error.log