Skip to content

Instantly share code, notes, and snippets.

@igancev
Created April 15, 2017 16:15
Show Gist options
  • Save igancev/d81fc2492dedb95fa55dd6bcef9500f8 to your computer and use it in GitHub Desktop.
Save igancev/d81fc2492dedb95fa55dd6bcef9500f8 to your computer and use it in GitHub Desktop.
docker
docker-compose.yml
---------------------------------------------
version: "2"
services:
nginx-frontend:
image: nginx
links:
- php-fpm
volumes:
- .:/app
- ./docker/nginx/frontend.conf:/etc/nginx/conf.d/default.conf
nginx-backend:
image: nginx
links:
- php-fpm
volumes:
- .:/app
- ./docker/nginx/backend.conf:/etc/nginx/conf.d/default.conf
php-fpm:
build:
context: ./docker/php7.0-fpm
args:
PHP_GID: 1000
PHP_UID: 1000
expose:
- 9000
volumes:
- .:/app
php-cli:
build:
context: ./docker/php7.0-cli
args:
PHP_GID: 1000
PHP_UID: 1000
volumes:
- .:/app
tty: true
postgres:
image: postgres:9.5
volumes:
- .:/app
docker-compose-override.sample.yml
---------------------------------------------
version: '2'
services:
nginx-frontend:
environment:
- VIRTUAL_HOST=domain.com
networks:
- default
- nginx-proxy
nginx-backend:
environment:
- VIRTUAL_HOST=admin.domain.com
networks:
- default
- nginx-proxy
postgres:
ports:
- 10010:5432
networks:
nginx-proxy:
external:
name: nginx-proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment