-
-
Save Artem-Schander/03e0e7db372a04c7ebfac34a61008125 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.2-fpm | |
RUN export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
libmcrypt-dev mysql-client libmagickwand-dev git zip \ | |
ghostscript imagemagick libmagickwand-dev \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN pecl install imagick mcrypt-1.0.1 \ | |
&& docker-php-ext-enable imagick mcrypt \ | |
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | |
&& docker-php-ext-install pdo_mysql zip gd | |
COPY php.ini /usr/local/etc/php/ | |
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | |
RUN chown www-data:www-data /var/www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
# The Application | |
app: | |
build: | |
context: ./ | |
dockerfile: app.dockerfile | |
working_dir: /var/www | |
volumes: | |
- ./:/var/www | |
environment: | |
DB_PORT: 3306 | |
DB_HOST: database | |
# The Web Server | |
web: | |
build: | |
context: ./ | |
dockerfile: web.dockerfile | |
working_dir: /var/www | |
volumes_from: | |
- app | |
ports: | |
- 80:80 | |
# The Database | |
database: | |
build: | |
context: ./ | |
dockerfile: mysql.dockerfile | |
volumes: | |
- dbdata:/var/lib/mysql | |
environment: | |
MYSQL_DATABASE: database | |
MYSQL_USER: user | |
MYSQL_PASSWORD: secret | |
MYSQL_ROOT_PASSWORD: secret | |
ports: | |
- 3306:3306 | |
volumes: | |
dbdata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
max_connections=1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mysql:5.6 | |
ADD mysql.cnf /etc/mysql/conf.d/mysql.cnf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
memory_limit=1G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
index index.php index.html; | |
root /var/www/public; | |
client_max_body_size 20M; | |
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:1.10 | |
ADD vhost.conf /etc/nginx/conf.d/default.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
composer
orartisan
commands can be executed through theapp
containerFa.
docker-compose exec app php artisan migrate:refresh --seed