This repository was archived by the owner on Nov 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (108 loc) · 2.83 KB
/
docker-compose.yml
File metadata and controls
115 lines (108 loc) · 2.83 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: '3.6'
volumes:
mysql_data: {}
composer_cache: {}
services:
mysql:
image: 'mysql:5.7'
ports:
- '3306:3306'
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_DATABASE=database
- MYSQL_USER=user
- MYSQL_PASSWORD=password
volumes:
- 'mysql_data:/var/lib/mysql'
redis:
build:
context: ./docker/redis
environment:
- REDIS_PASSWORD=redis
ports:
- '6379:6379'
api:
image: knitpk/api:latest
depends_on:
- mysql
- redis
build:
context: .
cache_from:
- knitpk/api:latest
args:
- COMPOSER_INSTALL_FLAGS= # default --no-dev
env_file: .env.dev
environment:
- HOST=api
volumes:
- '.:/usr/src/api'
- /usr/src/api/var
- /usr/src/api/public/admin
- 'composer_cache:/root/.composer'
ports:
- '8200:9501'
nginx:
build:
context: ./docker/nginx
args:
- 'ADMIN_PUBLIC_URL=/admin'
- 'ADMIN_API_URL=http://localhost'
depends_on:
- api
environment:
- PORT=9988
- 'API_URL=http://api:9501'
ports:
- '8100:9988'
volumes:
- './public:/usr/src/api/public'
- './vendor:/usr/src/api/vendor'
- '/usr/src/api/public/admin'
# standalone:
# image: knitpk/api:standalone
# depends_on:
# - mysql
# - redis
# build:
# dockerfile: Dockerfile.standalone
# context: .
# cache_from:
# - knitpk/api:standalone
# args:
# - KNIT_API_TAG=latest
# - KNIT_API_ADMIN_TAG=latest
# - 'KNTI_API_ADMIN_PUBLIC_URL=/admin'
# - 'KNIT_API_ADMIN_API_URL=http://localhost:8300'
# env_file: .env.dev
# environment:
# - PORT=9501
# - NGINX_PORT=8899
# volumes:
# - '.:/usr/src/api'
# - /usr/src/api/var
# - /usr/src/api/public/admin
# - 'composer_cache:/root/.composer'
# ports:
# - '8300:8899'
varnish:
depends_on:
- nginx
- api
build:
context: ./docker/varnish
volumes:
- './docker/varnish/conf:/etc/varnish:ro'
ports:
- '80:80'
pma:
build:
context: ./docker/pma
depends_on:
- mysql
environment:
- PMA_HOST=mysql
- PMA_USER=user
- PMA_PASSWORD=password
ports:
- '8000:80'