-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (78 loc) · 1.6 KB
/
docker-compose.yml
File metadata and controls
85 lines (78 loc) · 1.6 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
services:
app:
build:
context: .
dockerfile: Dockerfile
image: laravel-queue-example
container_name: laravel_app
restart: unless-stopped
working_dir: /var/www
volumes:
- composer_cache:/var/www/vendor
- .:/var/www
networks:
- laravel
queue:
image: laravel-queue-example
container_name: laravel_queue
restart: unless-stopped
working_dir: /var/www
volumes:
- composer_cache:/var/www/vendor
- .:/var/www
networks:
- laravel
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
command: php artisan queue:work --tries=3
web:
image: nginx:alpine
container_name: laravel_web
restart: unless-stopped
ports:
- 8000:80
volumes:
- .:/var/www
- ./nginx:/etc/nginx/conf.d
depends_on:
- app
networks:
- laravel
db:
image: mysql:latest
container_name: laravel_db
restart: unless-stopped
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: secret
volumes:
- dbdata:/var/lib/mysql
networks:
- laravel
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:alpine
container_name: laravel_redis
restart: unless-stopped
networks:
- laravel
mailpit:
image: axllent/mailpit:latest
container_name: mailpit
ports:
- 8025:8025
- 1025:1025
networks:
- laravel
networks:
laravel:
volumes:
dbdata:
composer_cache: