Simplification au max de la stack.
This commit is contained in:
parent
0e7bb55369
commit
48be49ecc1
13
Dockerfile
13
Dockerfile
@ -22,6 +22,9 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Copy vhost config
|
# Copy vhost config
|
||||||
COPY vhost.conf /etc/apache2/sites-available/000-default.conf
|
COPY vhost.conf /etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
|
# Enable Apache mods
|
||||||
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
# Install PHP extensions
|
# Install PHP extensions
|
||||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
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
|
&& docker-php-ext-install pdo pdo_mysql mbstring exif pcntl bcmath gd zip curl intl
|
||||||
@ -29,13 +32,13 @@ RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
|||||||
# Get latest Composer
|
# Get latest Composer
|
||||||
RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
|
RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
|
||||||
|
|
||||||
|
# Clean cache
|
||||||
|
RUN apt-get -y autoremove \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
COPY . /var/www
|
COPY . /var/www
|
||||||
|
|
||||||
# Install php dependencies
|
# Install php dependencies
|
||||||
RUN composer install --quiet --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
|
RUN composer install --quiet --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
|
||||||
|
|
||||||
# Clean cache
|
|
||||||
RUN apt-get -y autoremove \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
||||||
|
|||||||
@ -1,49 +1,33 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
networks:
|
#networks:
|
||||||
app:
|
# app:
|
||||||
driver: bridge
|
# driver: bridge
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: ./docker/app
|
context: .
|
||||||
args:
|
|
||||||
WWW_USER: '${WWW_USER}'
|
|
||||||
WWW_GROUP: '${WWW_GROUP}'
|
|
||||||
networks:
|
|
||||||
- app
|
|
||||||
volumes:
|
|
||||||
- '.:/var/www'
|
|
||||||
user: '${WWW_USER}'
|
|
||||||
|
|
||||||
nginx:
|
|
||||||
build:
|
|
||||||
context: ./docker/nginx
|
|
||||||
ports:
|
ports:
|
||||||
- ${APP_PORT:-80}:80
|
- ${APP_PORT:-80}:80
|
||||||
networks:
|
# args:
|
||||||
- app
|
# WWW_USER: '${WWW_USER}'
|
||||||
volumes:
|
# WWW_GROUP: '${WWW_GROUP}'
|
||||||
- './public:/var/www/public'
|
# networks:
|
||||||
|
# - app
|
||||||
|
# volumes:
|
||||||
|
# - '.:/var/www'
|
||||||
|
# user: '${WWW_USER}'
|
||||||
|
|
||||||
mailhog:
|
# mysql:
|
||||||
image: 'mailhog/mailhog:latest'
|
# image: 'mysql:8.0'
|
||||||
ports:
|
# environment:
|
||||||
- '${FORWARD_MAILHOG_PORT:-1025}:1025'
|
# MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
|
||||||
- '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
|
# MYSQL_DATABASE: '${DB_DATABASE}'
|
||||||
networks:
|
# MYSQL_USER: '${DB_USERNAME}'
|
||||||
- app
|
# MYSQL_PASSWORD: '${DB_PASSWORD}'
|
||||||
|
# MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
|
||||||
mysql:
|
# networks:
|
||||||
image: 'mysql:8.0'
|
# - app
|
||||||
environment:
|
# ports:
|
||||||
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
|
# - '${FORWARD_MYSQL_PORT:-3306}:3306'
|
||||||
MYSQL_DATABASE: '${DB_DATABASE}'
|
|
||||||
MYSQL_USER: '${DB_USERNAME}'
|
|
||||||
MYSQL_PASSWORD: '${DB_PASSWORD}'
|
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
|
|
||||||
networks:
|
|
||||||
- app
|
|
||||||
ports:
|
|
||||||
- '${FORWARD_MYSQL_PORT:-3306}:3306'
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user