-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 1.54 KB
/
docker-compose.yml
File metadata and controls
72 lines (67 loc) · 1.54 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
services:
app:
build:
context: .
dockerfile: docker/php/Dockerfile
container_name: lms-app
volumes:
- .:/var/www/html
env_file:
- .env
depends_on: []
web:
image: nginx:1.27-alpine
container_name: lms-web
ports:
- "8000:80"
volumes:
- .:/var/www/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- app
# Queue worker
worker:
build:
context: .
dockerfile: docker/php/Dockerfile
container_name: lms-worker
command: sh -c "php artisan queue:work --queue=attachments,default --sleep=3 --tries=3"
volumes:
- .:/var/www/html
depends_on:
- app
# Scheduler (runs 'schedule:run' every minute)
scheduler:
build:
context: .
dockerfile: docker/php/Dockerfile
container_name: lms-scheduler
command: sh -c "while true; do php artisan schedule:run --verbose --no-interaction; sleep 60; done"
volumes:
- .:/var/www/html
depends_on:
- app
redis:
container_name: lms-redis
image: redis:7-alpine
ports: ["6379:6379"]
horizon:
container_name: lms-horizon
build:
context: .
dockerfile: docker/php/Dockerfile
command: php artisan horizon
depends_on: [app, redis]
volumes:
- .:/var/www/html
env_file:
- .env
node:
image: node:20-alpine
container_name: lms-node
working_dir: /var/www/html
volumes:
- .:/var/www/html
command: sh -c "npm ci && npm run dev"
depends_on:
- web