-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (57 loc) · 1.26 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
version: '3.1'
services:
php-fpm:
build:
context: ./docker/php-fpm
target: dev
args:
PHP_VERSION: ${PHP_VERSION}
container_name: php-fpm
restart: on-failure
user: ${PHP_OWNER}
depends_on:
- db
- redis
- rabbitmq
volumes:
- .:/var/www/html
command: sh -c 'composer install --no-interaction --optimize-autoloader && php-fpm'
nginx:
image: mmierzynski/nginx:1.20
container_name: nginx
restart: on-failure
ports:
- ${NGINX_PORT}:80
volumes:
- .:/var/www/html
- ./docker/nginx/config/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php-fpm
db:
image: mariadb:${MARIADB_VERSION}
container_name: mariadb
restart: on-failure
volumes:
- database:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
redis:
image: redis:7.0
container_name: redis
restart: on-failure
ports:
- 6379:6379
rabbitmq:
image: rabbitmq:3.11-management
container_name: rabbitmq
ports:
- 5672:5672
- 15672:15672
volumes:
database:
driver: local
database_test:
driver: local