Skip to content

Instantly share code, notes, and snippets.

@cgiovanii
Last active October 13, 2017 19:56
Show Gist options
  • Save cgiovanii/54eb1df195a0b693a0f15ae60cc7813d to your computer and use it in GitHub Desktop.
Save cgiovanii/54eb1df195a0b693a0f15ae60cc7813d to your computer and use it in GitHub Desktop.
version: "2"
services:
web:
image: nginx:latest
container_name: Nginx
ports:
- "80:80"
volumes:
- ./public:/public
- ./src/site.conf:/etc/nginx/conf.d/site.conf ### ficheiro em anexo
- ./src/nginx/logs:/var/log/nginx/
php:
image: php:7-fpm
container_name: PHP7
volumes:
- ./public:/public
db:
image: mariadb:latest
container_name: MariaDB
volumes:
- ./src/mariadb:/var/lib/mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_DATABASE: dev
MYSQL_USER: dev
MYSQL_PASSWORD: dev123
expose:
- 3306
pma:
image: phpmyadmin/phpmyadmin
container_name: PHPMyAdmin
environment:
PMA_ARBITRARY: 1
PMA_HOST: db
PMA_USER: dev
PMA_PASSWORD: dev123
PHP_UPLOAD_MAX_FILESIZE: 1G
PHP_MAX_INPUT_VARS: 1G
restart: always
ports:
- "8001:80"
volumes:
- ./src/sessions:/sessions
server {
index index.php index.html;
server_name myhost.dev;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /public;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment