-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
84 lines (79 loc) · 1.63 KB
/
docker-compose.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3.2'
networks:
mooc-network:
driver: bridge
services:
mooc-db:
image: postgres:10.8-alpine
ports:
- 5432:5432
expose:
- 5432
volumes:
- ./postgres-data:/var/lib/postgresql/data:Z
- ./init_db_data.sql:/docker-entrypoint-initdb.d/init_db_data.sql
networks:
- mooc-network
environment:
POSTGRES_PASSWORD: root
POSTGRES_DB: phalcon
command: postgres -c logging_collector=on -c log_destination=stderr -c log_statement=all
composer-web:
restart: 'no'
image: composer:1.10.0
command: install
volumes:
- type: bind
source: ./web
target: /var/www/html
working_dir: /var/www/html
composer-api:
restart: 'no'
image: composer:1.10.0
command: install
volumes:
- type: bind
source: ./api
target: /var/www/html
working_dir: /var/www/html
mooc-web:
build:
context: .
dockerfile: ./Dockerfile
args:
- env=dev
- phalcon_version=v4.0.5
expose:
- 80
ports:
- 80:80
volumes:
- type: bind
source: ./web/
target: /var/www/html
networks:
- mooc-network
working_dir: /var/www/html
depends_on:
- mooc-db
- mooc-api
mooc-api:
build:
context: .
dockerfile: ./Dockerfile
args:
- env=dev
- phalcon_version=v4.0.5
expose:
- 8080
ports:
- 8080:80
volumes:
- type: bind
source: ./api/
target: /var/www/html
networks:
- mooc-network
working_dir: /var/www/html
depends_on:
- mooc-db