Skip to content

Instantly share code, notes, and snippets.

@Mararok
Created March 17, 2017 05:52
Show Gist options
  • Select an option

  • Save Mararok/5301881dc1752379e122c9c340389487 to your computer and use it in GitHub Desktop.

Select an option

Save Mararok/5301881dc1752379e122c9c340389487 to your computer and use it in GitHub Desktop.
phpfpm LB nginx docker
version: '2'
services:
nginx-proxy:
image: devtheops/nginx-proxy-phpfpm
container_name: nginx-proxy
ports:
- "30000:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- DEFAULT_HOST=test.local
- APP_LOCATION=/app
phpfpm:
build: .
environment:
- VIRTUAL_HOST=test.local
- VIRTUAL_PORT=9000
FROM php:7.0.16-fpm-alpine
COPY . /app
<?php
echo "from container";
phpinfo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment