-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
114 lines (107 loc) · 2.61 KB
/
Copy pathdocker-compose.yml
File metadata and controls
114 lines (107 loc) · 2.61 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: carteira
services:
app:
build:
context: .
args:
APP_UID: ${APP_UID:-1000}
APP_GID: ${APP_GID:-1000}
restart: unless-stopped
volumes:
- .:/var/www/html
- vendor:/var/www/html/vendor
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "php-fpm", "-t"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
networks:
- wallet
nginx:
image: nginx:1.27-alpine
restart: unless-stopped
ports:
- "${APP_PORT:-18080}:80"
volumes:
- .:/var/www/html:ro
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
app:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
networks:
- wallet
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_DATABASE:-wallet}
POSTGRES_USER: ${DB_USERNAME:-wallet}
POSTGRES_PASSWORD: ${DB_PASSWORD:-wallet_local_password}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
networks:
- wallet
redis:
image: redis:7.4-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- wallet
queue:
build:
context: .
args:
APP_UID: ${APP_UID:-1000}
APP_GID: ${APP_GID:-1000}
restart: unless-stopped
command: ["php", "artisan", "queue:work", "--sleep=3", "--tries=3", "--timeout=90"]
volumes:
- .:/var/www/html
- vendor:/var/www/html/vendor
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "php", "artisan", "queue:monitor", "redis:default", "--max=100"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
networks:
- wallet
volumes:
postgres_data:
redis_data:
vendor:
networks:
wallet:
driver: bridge