Created
June 7, 2018 01:51
-
-
Save wayanjimmy/e1f3d42277d47818157d4d383603feab to your computer and use it in GitHub Desktop.
Laravel Docker php7.2, mail testing, adminer and s3 mock using minio
This file contains hidden or 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: "3" | |
services: | |
minio: | |
build: | |
context: . | |
dockerfile: minio.dockerfile | |
ports: | |
- "9000:9000" | |
volumes: | |
- ./.minio/data:/export | |
- ./.minio/config:/root/.minio | |
environment: | |
- MINIO_ACCESS_KEY=access | |
- MINIO_SECRET_KEY=secretkey | |
mailhog: | |
image: mailhog/mailhog:latest | |
ports: | |
- "1025:1025" | |
- "8025:8025" | |
web: | |
image: nginx:latest | |
ports: | |
- "8000:80" | |
volumes: | |
- .:/usr/web/ | |
- ./site.conf:/etc/nginx/conf.d/default.conf | |
links: | |
- app | |
restart: unless-stopped | |
adminer: | |
image: adminer | |
restart: always | |
ports: | |
- "8080:8080" | |
app: | |
build: | |
context: . | |
volumes: | |
- .:/usr/web/ | |
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini | |
restart: unless-stopped | |
volumes: | |
data: | |
miniodata: | |
This file contains hidden or 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 apt-get update && apt-get install -y libpng-dev libjpeg-dev libpq-dev git\ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ | |
&& docker-php-ext-install gd mbstring pdo pdo_mysql pdo_pgsql zip | |
#Get Composer | |
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \ | |
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \ | |
# Make sure we're installing what we think we're installing! | |
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \ | |
&& php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer --snapshot \ | |
&& rm -f /tmp/composer-setup.* | |
#Get Imagick | |
RUN export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \ | |
&& apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
libmagickwand-dev \ | |
ghostscript \ | |
libgs-dev \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& pecl install imagick-3.4.3 \ | |
&& docker-php-ext-enable imagick | |
# Create app directory | |
WORKDIR /usr/web | |
COPY . . | |
RUN composer install --no-interaction |
This file contains hidden or 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 minio/minio | |
ENTRYPOINT ["minio", "server", "/export"] |
This file contains hidden or 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 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
client_max_body_size 64M; | |
server_name 127.0.0.1; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
root /usr/web/public; | |
index index.php index.html index.htm; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
try_files $uri /index.php =404; | |
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 hidden or 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
file_uploads = On | |
memory_limit = 2048M | |
upload_max_filesize = 64M | |
post_max_size = 64M | |
max_execution_time = 600 | |
max_input_time = 600 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment