Add docker support
This commit is contained in:
parent
d5dfb12856
commit
509080a62b
48
Dockerfile
Normal file
48
Dockerfile
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
FROM php:8.4-fpm
|
||||||
|
|
||||||
|
ARG user
|
||||||
|
ARG uid
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
git \
|
||||||
|
curl \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
sqlite3 \
|
||||||
|
libpng-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libzip-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libonig-dev \
|
||||||
|
libicu-dev \
|
||||||
|
build-essential \
|
||||||
|
openssl
|
||||||
|
|
||||||
|
# Install PHP extensions
|
||||||
|
RUN docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg
|
||||||
|
RUN docker-php-ext-install gd \
|
||||||
|
pdo \
|
||||||
|
pdo_sqlite \
|
||||||
|
mbstring \
|
||||||
|
zip \
|
||||||
|
exif \
|
||||||
|
bcmath \
|
||||||
|
intl \
|
||||||
|
fileinfo
|
||||||
|
|
||||||
|
# Install Node.js (LTS version) and npm
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
||||||
|
&& apt-get install -y nodejs
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Get latest Composer
|
||||||
|
RUN curl -sS https://getcomposer.org/installer | php -- \
|
||||||
|
--install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
|
WORKDIR /var/www
|
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
container_name: lolispace_applications
|
||||||
|
working_dir: /var/www
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www
|
||||||
|
networks:
|
||||||
|
- lolispace_applications_bridge
|
||||||
|
|
||||||
|
webserver:
|
||||||
|
image: nginx:alpine
|
||||||
|
container_name: lolispace_webserver
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
volumes:
|
||||||
|
- ./:/var/www
|
||||||
|
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
|
||||||
|
depends_on:
|
||||||
|
- app
|
||||||
|
networks:
|
||||||
|
- lolispace_applications_bridge
|
||||||
|
|
||||||
|
networks:
|
||||||
|
lolispace_applications_bridge:
|
||||||
|
driver: bridge
|
20
nginx/default.conf
Normal file
20
nginx/default.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
index index.php index.html;
|
||||||
|
root /var/www/public;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass app:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.ht {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user