forked from ineat/docker-php-nginx-postgres-composer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (50 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
51 lines (50 loc) · 1.36 KB
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
version: '3'
services:
web:
image: nginx
volumes:
- ./.docker/conf/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./:/var/www/html
ports:
- 8001:80
restart: always
depends_on:
- php
- db
php:
build: .docker
restart: always
volumes:
- ./.docker/conf/php/php.ini:/usr/local/etc/php/conf.d/php.ini
- ./.docker/conf/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
- ./:/var/www/html
composer:
image: composer
volumes:
- .:/app
command: install
db:
image: postgres:10.1
restart: always
environment:
- POSTGRES_DB=${DB_DATABASE}
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
ports:
- 54321:5432
volumes:
- ./.docker/conf/postgres/:/docker-entrypoint-initdb.d/
- ./.docker/DB_data/:/var/lib/postgresql/data
php-cli:
build:
context: ./
dockerfile: .docker/php-cli.docker
links:
- db
volumes:
- ./:/var/www
environment:
- POSTGRES_DB=${DB_DATABASE}
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
tty: true