docker

Docker for services
git clone git://git.unixkoans.com/docker.git
Log | Files | Refs

docker-compose.yml (976B)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: '2'

services:
  php:
    image: php:7.1-fpm-custom
    restart: always
    volumes:
      - ./www.conf:/usr/local/etc/php-fpm.d/www.conf
      - ./../../sites:/var/www/html
    logging:
      driver: fluentd
      options:
        fluentd-address: 127.0.0.1:24224
        tag: php

  nginx:
    image: nginx:stable
    restart: always
    depends_on:
      - php
      - mysql
      - redis
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
      - ./conf.d:/etc/nginx/conf.d
      - ./../../sites:/var/www/html
    logging:
      driver: fluentd
      options:
        fluentd-address: 127.0.0.1:24224
        tag: nginx

  mysql:
    image: mysql:5.7
    restart: always
    ports:
      - 3306:3306
    volumes:
      - ./data/mysql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=root

  redis:
    image: redis:3
    restart: always
    ports:
      - 6379:6379
    volumes:
      - ./data/redis:/data