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:
|
isop-backend:
|
||||||
container_name: isop-backend
|
container_name: isop-backend
|
||||||
image: dunglas/frankenphp
|
build:
|
||||||
|
context: ../backend
|
||||||
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
- ../backend/.env
|
- ../backend/.env
|
||||||
@@ -37,8 +39,6 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 443:443
|
- 443:443
|
||||||
- 443:443/udp
|
- 443:443/udp
|
||||||
volumes:
|
|
||||||
- ../backend:/app
|
|
||||||
depends_on:
|
depends_on:
|
||||||
isop-database:
|
isop-database:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
Reference in New Issue
Block a user