feat: build custom image for backend

This commit is contained in:
2025-12-02 16:19:51 +01:00
parent c99017623b
commit 187b56b464
3 changed files with 28 additions and 3 deletions

9
backend/.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
.git
.env
storage/logs/*
storage/framework/cache/*
storage/framework/sessions/*
storage/framework/views/*
bootstrap/cache/*
.phpunit.result.cache
vendor/*

16
backend/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM dunglas/frankenphp:1.10-php8.4-bookworm
RUN install-php-extensions \
pdo_mysql \
gd \
intl \
zip \
opcache
COPY . /app
WORKDIR /app
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer install --no-dev --optimize-autoloader

View File

@@ -23,7 +23,9 @@ services:
isop-backend:
container_name: isop-backend
image: dunglas/frankenphp
build:
context: ../backend
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- ../backend/.env
@@ -37,8 +39,6 @@ services:
ports:
- 443:443
- 443:443/udp
volumes:
- ../backend:/app
depends_on:
isop-database:
condition: service_healthy