-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (94 loc) · 2.57 KB
/
docker-compose.yml
File metadata and controls
98 lines (94 loc) · 2.57 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
services:
app:
container_name: slim-app
build:
context: .
dockerfile: .docker/php/Dockerfile
target: ${DOCKER_TARGET_APP:-fpm}
args:
INSTALL_XDEBUG: ${DOCKER_INSTALL_XDEBUG:-false}
working_dir: /var/www
environment:
DOCKER: "1"
PHP_IDE_CONFIG: "serverName=slim.local"
volumes:
- ./.docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./.docker/php/php.ini:/usr/local/etc/php/conf.d/php.ini:ro
- ./.docker/php/php-fpm.conf:/usr/local/etc/php-fpm.d/php-fpm.conf:ro
- ./.docker/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini:ro
- .:/var/www:delegated
ports:
- "${EXTERNAL_APP_PORT:-80}:8080"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- slim
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health-check" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
db:
container_name: slim-db
image: postgres:17.4-alpine
ports:
- "${FORWARD_DB_PORT:-5432}:5432"
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
networks:
- slim
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}" ]
interval: 10s
timeout: 5s
retries: 5
rabbitmq:
container_name: slim-rabbitmq
image: rabbitmq:4.1.0-management-alpine
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER:-rabbitmq}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS:-rabbitmq}
RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_VHOST:-app}
RABBITMQ_NODENAME: rabbit@slim-rabbitmq
RABBITMQ_ERLANG_COOKIE: ${RABBITMQ_ERLANG_COOKIE:-UNIQUE_RABBITMQ_COOKIE}
networks:
- slim
restart: unless-stopped
healthcheck:
test: [ "CMD", "rabbitmq-diagnostics", "check_port_connectivity" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
redis:
container_name: slim-redis
image: redis:7.4.3-alpine3.21
ports:
- "${DOCKER_REDIS_HOST_PORT:-6379}:6379"
networks:
- slim
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
networks:
slim:
driver: bridge
name: slim-network