-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yml
94 lines (94 loc) · 1.93 KB
/
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
85
86
87
88
89
90
91
92
93
94
version: "3.8"
services:
php:
build:
context: './php/'
args:
- PHP_VERSION=${PHP_VERSION:-8.0}-fpm
networks:
- backend
volumes:
- ./projects/:/var/www/html/
apache:
build:
context: './apache/'
args:
- APACHE_VERSION=${APACHE_VERSION:-2.4.53}-alpine
depends_on:
- php
networks:
- frontend
- backend
ports:
- "8080:80"
volumes:
- ./projects/:/var/www/html/
nginx:
image: nginx:${NGINX_VERSION:-latest}
depends_on:
- php
ports:
- "8080:80"
volumes:
- ./projects/:/var/www/html/
- ./nginx/:/etc/nginx/conf.d/
networks:
- frontend
- backend
profiles: ["nginx"]
swoole:
build:
context: './swoole/'
args:
- SWOOLE_VERSION=${SWOOLE_VERSION:-latest}
depends_on:
- php
- mysql
restart: always
ports:
- "8095:8095"
volumes:
- ./projects/:/var/www/html/
networks:
- frontend
- backend
profiles: ["swoole"]
mysql:
image: mysql:${MYSQL_VERSION:-8.0}
volumes:
- ./mysql/db:/var/lib/mysql:rw
- ./mysql/sql:/docker-entrypoint-initdb.d/:rw
networks:
- backend
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
profiles: ["mysql"]
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- '8099:80'
restart: always
environment:
PMA_HOST: mysql
depends_on:
- mysql
networks:
- backend
profiles: ["mysql"]
postgres :
image: postgres:${POSTGRES_VERSION:-12.4}
volumes:
- pgdata:/var/lib/postgresql/data
- ./postgres/sql:/docker-entrypoint-initdb.d/:rw
networks:
- backend
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- PGDATA=/work/data
profiles: ["postgres"]
networks:
frontend:
backend:
volumes:
pgdata: {}