-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
174 lines (173 loc) · 3.95 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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
services:
phpmyadmin-mysql:
image: phpmyadmin:latest
container_name: mysql-adminer
networks:
- database
restart: always
ports:
- "3000:80"
environment:
PMA_ARBITRARY: 1
PMA_HOST: mysql
PMA_PORT: 3306
depends_on:
- mysql
mysql:
image: mysql:latest
container_name: mysql
ports:
- "3306:3306"
volumes:
- ./config/mysql/my.cnf:/etc/my.cnf
- ./config/mysql/databases/:/docker-entrypoint-initdb.d/
networks:
- app
- database
restart: always
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
depends_on:
- nginx
phpmyadmin-mariadb:
image: phpmyadmin:latest
container_name: mariadb-adminer
networks:
- database
restart: always
ports:
- "4000:80"
environment:
PMA_ARBITRARY: 1
PMA_HOST: mariadb
PMA_PORT: 3306
depends_on:
- mariadb
mariadb:
image: mariadb:latest
container_name: mariadb
ports:
- "33060:3306"
volumes:
- ./config/mariadb/mariadb.cnf:/etc/mysql/mariadb.cnf
- ./config/mariadb/databases/:/docker-entrypoint-initdb.d/
networks:
- app
- database
restart: always
environment:
- MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true
depends_on:
- nginx
pgadmin4:
image: elestio/pgadmin:latest
container_name: postgresql-adminer
networks:
- app
- database
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: root@example.com
PGADMIN_DEFAULT_PASSWORD: root
PGADMIN_LISTEN_PORT: 8080
ports:
- "5000:8080"
depends_on:
- postgresql
postgresql:
image: postgres:latest
container_name: postgres
ports:
- "5432:5432"
command: -c config_file=/etc/postgresql.conf
volumes:
- ./config/postgresql/postgresql.conf:/etc/postgresql.conf
- ./config/postgresql/databases/:/docker-entrypoint-initdb.d/
networks:
- app
- database
restart: always
environment:
- POSTGRES_PASSWORD=root
depends_on:
- nginx
nginx:
build:
context: ./config/nginx
dockerfile: Dockerfile
container_name: app
ports:
- "80:80"
- "443:443"
volumes:
- ./www:/usr/share/nginx/html
- ./config/nginx/php-cli/php.ini:/etc/php/8.2/cli/php.ini
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./config/nginx/conf.d/:/etc/nginx/conf.d/
- ./config/nginx/certs/:/etc/nginx/certs/
networks:
- app
- database
restart: always
depends_on:
- php8.3-fpm
- php7.4-fpm
php7.4-fpm:
build:
context: ./config/php-fpm/7.4
dockerfile: Dockerfile
container_name: fpm-7.4
ports:
- ":9000"
volumes:
- ./www:/usr/share/nginx/html
- ./config/php-fpm/7.4/conf/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./config/php-fpm/7.4/xdebug/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
networks:
- app
restart: always
php8.3-fpm:
build:
context: ./config/php-fpm/8.3
dockerfile: Dockerfile
container_name: fpm-8.3
ports:
- ":9000"
volumes:
- ./www:/usr/share/nginx/html
- ./config/php-fpm/8.3/conf/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./config/php-fpm/8.3/xdebug/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
networks:
- app
restart: always
redis:
image: redis:latest
container_name: redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "6379:6379"
volumes:
- ./config/redis/data:/data
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
healthcheck:
test: [ "CMD", "redis-cli", "-a", "root", "ping" ]
interval: 30s
timeout: 10s
retries: 5
networks:
- app
- database
restart: always
networks:
app:
driver: bridge
database:
driver: bridge