Réorganisation des fichiers.
This commit is contained in:
parent
b6c50472f6
commit
df573eb676
@ -8,16 +8,9 @@ services:
|
|||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
dockerfile: docker/prod.Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- ${APP_PORT:-80}:80
|
- ${APP_PORT:-80}:80
|
||||||
# args:
|
|
||||||
# WWW_USER: '${WWW_USER}'
|
|
||||||
# WWW_GROUP: '${WWW_GROUP}'
|
|
||||||
# networks:
|
|
||||||
# - app
|
|
||||||
# volumes:
|
|
||||||
# - '.:/var/www'
|
|
||||||
# user: '${WWW_USER}'
|
|
||||||
|
|
||||||
# mysql:
|
# mysql:
|
||||||
# image: 'mysql:8.0'
|
# image: 'mysql:8.0'
|
||||||
|
|||||||
@ -1,49 +0,0 @@
|
|||||||
FROM php:8.1-fpm
|
|
||||||
|
|
||||||
ARG WWW_USER
|
|
||||||
ARG WWW_GROUP
|
|
||||||
ARG NODE_VERSION=16
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /var/www
|
|
||||||
|
|
||||||
# Install system dependencies
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
git \
|
|
||||||
curl \
|
|
||||||
libpng-dev \
|
|
||||||
libjpeg-dev \
|
|
||||||
libfreetype6-dev \
|
|
||||||
libonig-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libpq-dev \
|
|
||||||
libzip-dev \
|
|
||||||
libcurl4-openssl-dev \
|
|
||||||
zip \
|
|
||||||
unzip \
|
|
||||||
default-mysql-client
|
|
||||||
|
|
||||||
# Enable xdebug
|
|
||||||
RUN pecl install xdebug \
|
|
||||||
&& docker-php-ext-enable xdebug
|
|
||||||
|
|
||||||
# Install PHP extensions
|
|
||||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
|
||||||
&& docker-php-ext-install pdo pdo_mysql mbstring exif pcntl bcmath gd zip curl intl
|
|
||||||
|
|
||||||
# Get latest Composer
|
|
||||||
RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
|
|
||||||
|
|
||||||
# Install Yarn
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
|
|
||||||
&& apt-get install -y nodejs \
|
|
||||||
&& npm install -g npm
|
|
||||||
|
|
||||||
# Clean cache
|
|
||||||
RUN apt-get -y autoremove \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
# Create user
|
|
||||||
RUN groupadd --force -g $WWW_GROUP webapp
|
|
||||||
RUN useradd -ms /bin/bash --no-user-group -g $WWW_GROUP -u $WWW_USER webapp
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
FROM nginx:alpine
|
|
||||||
|
|
||||||
# Add vhost config
|
|
||||||
ADD ./vhost.conf /etc/nginx/conf.d/default.conf
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
index index.php index.html;
|
|
||||||
root /var/www/public;
|
|
||||||
access_log /var/log/nginx/access.log;
|
|
||||||
error_log /var/log/nginx/error.log;
|
|
||||||
location / {
|
|
||||||
try_files $uri /index.php?$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
||||||
fastcgi_pass app:9000;
|
|
||||||
fastcgi_index index.php;
|
|
||||||
include fastcgi_params;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -58,7 +58,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
default-mysql-client
|
default-mysql-client
|
||||||
|
|
||||||
# Copy vhost config
|
# Copy vhost config
|
||||||
COPY vhost.conf /etc/apache2/sites-available/000-default.conf
|
COPY docker/vhost.conf /etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
# Enable Apache mods
|
# Enable Apache mods
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
Loading…
x
Reference in New Issue
Block a user