You've already forked isop-mirror
feat: build custom image for backend
This commit is contained in:
9
backend/.dockerignore
Normal file
9
backend/.dockerignore
Normal 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
16
backend/Dockerfile
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user