-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·124 lines (112 loc) · 3 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
services:
webserver:
image: nginx:alpine
container_name: ${APP}-webserver
working_dir: /mnt/api
volumes:
- ./api:/mnt/api
- ./app:/mnt/public
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "${APP_PORT}:80"
- "8081:8081"
depends_on:
- database
- php-fpm
- php-files
- php-line
- php-invoice
- php-mail
php-fpm:
build: docker/php-fpm
container_name: ${APP}-php-fpm
working_dir: /mnt/api/
volumes:
- ./api:/mnt/api/
- .env:/mnt/api/.env
- ./docker/php-fpm/php-ini-overrides.local.ini:/etc/php/8.3/fpm/conf.d/99-overrides.ini
ports:
- "8000:8000"
php-files:
build: docker/php-fpm
container_name: ${APP}-php-files
command: "php artisan rabbitmq:consume-files"
working_dir: /mnt/api/
volumes:
- ./api:/mnt/api/
- .env:/mnt/api/.env
- ./docker/php-fpm/${PHP_INI_OVERRIDES}:/etc/php/8.3/fpm/conf.d/99-overrides.ini
depends_on:
rabbitmq:
condition: service_healthy
php-line:
build: docker/php-fpm
container_name: ${APP}-php-line
command: "php artisan rabbitmq:consume-line"
working_dir: /mnt/api/
volumes:
- ./api:/mnt/api/
- .env:/mnt/api/.env
- ./docker/php-fpm/${PHP_INI_OVERRIDES}:/etc/php/8.3/fpm/conf.d/99-overrides.ini
depends_on:
rabbitmq:
condition: service_healthy
php-invoice:
build: docker/php-fpm
container_name: ${APP}-php-invoice
command: "php artisan rabbitmq:consume-invoice"
working_dir: /mnt/api/
volumes:
- ./api:/mnt/api/
- .env:/mnt/api/.env
- ./docker/php-fpm/${PHP_INI_OVERRIDES}:/etc/php/8.3/fpm/conf.d/99-overrides.ini
depends_on:
rabbitmq:
condition: service_healthy
php-mail:
build: docker/php-fpm
container_name: ${APP}-php-mail
command: "php artisan rabbitmq:consume-mail"
depends_on:
rabbitmq:
condition: service_healthy
working_dir: /mnt/api/
volumes:
- ./api:/mnt/api/
- .env:/mnt/api/.env
- ./docker/php-fpm/${PHP_INI_OVERRIDES}:/etc/php/8.3/fpm/conf.d/99-overrides.ini
database:
image: mysql:8.0.32
container_name: ${APP}-database
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
ports:
- "3306:3306"
volumes:
- ./data/volumes/mysql:/var/lib/mysql
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: ${APP}-rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
ports:
- "5672:5672"
- "15672:15672"
volumes:
- ./data/rabbitmq/log/:/var/log/rabbitmq
- ./data/rabbitmq:/var/lib/rabbitmq/mnesia
redis:
image: redis:alpine
container_name: ${APP}-redis
adminredis:
image: erikdubbelboer/phpredisadmin
environment:
- REDIS_1_HOST=redis
- REDIS_1_NAME=MyRedis
ports:
- "8092:80"