Skip to content

Instantly share code, notes, and snippets.

@rmsaitam
Created May 25, 2019 20:17
Show Gist options
  • Save rmsaitam/45f93a754e902a89319efd9361a07a70 to your computer and use it in GitHub Desktop.
Save rmsaitam/45f93a754e902a89319efd9361a07a70 to your computer and use it in GitHub Desktop.
Ambiente Nginx + PHP 7.2-FPM + MariaDB
version: '3'
services:
#PHP Service
php:
image: binhle410/php7.2-fpm
container_name: php-fpm
depends_on:
- db
command: bash -c "php-fpm && php-fpm -v"
volumes:
- ./src:/var/www/html:rw
#Nginx Service
webserver:
image: nginx:alpine
container_name: nginx
depends_on:
- php
ports:
- "80:80"
volumes:
- ./src:/var/www/html:rw
#MySQL Service
db:
image: mariadb
container_name: mariadb
restart: always
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_DATABASE=nomebanco
- MYSQL_USER=user
- MYSQL_PASSWORD=secret
volumes:
- ./mariadb:/var/lib/mysql/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment