-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (56 loc) · 1.61 KB
/
docker-compose.yml
File metadata and controls
59 lines (56 loc) · 1.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
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: laravel-app
restart: unless-stopped
working_dir: /var/www
volumes:
- ./:/var/www
command: >
sh -lc "
chown -R 1000:33 /var/www/storage /var/www/bootstrap/cache /var/www/database &&
find /var/www/storage /var/www/bootstrap/cache /var/www/database -type d -exec chmod 2775 {} + &&
find /var/www/storage /var/www/bootstrap/cache /var/www/database -type f -exec chmod 664 {} + &&
php-fpm
"
networks:
- nginx-network
queue-worker:
build:
context: .
dockerfile: Dockerfile
container_name: laravel-queue-worker
restart: unless-stopped
working_dir: /var/www
volumes:
- ./:/var/www
command: >
sh -lc "
chown -R 1000:33 /var/www/storage /var/www/bootstrap/cache /var/www/database &&
find /var/www/storage /var/www/bootstrap/cache /var/www/database -type d -exec chmod 2775 {} + &&
find /var/www/storage /var/www/bootstrap/cache /var/www/database -type f -exec chmod 664 {} + &&
php artisan queue:work --sleep=3 --tries=3 --max-time=3600
"
networks:
- nginx-network
depends_on:
- app
webserver:
image: nginx:alpine
container_name: laravel-webserver
restart: unless-stopped
ports:
- "8080:80" # On pourra le cacher derrière le proxy plus tard
volumes:
- ./:/var/www
- ./docker-compose/nginx:/etc/nginx/conf.d/
networks:
- nginx-network
- proxy_default
networks:
nginx-network:
external: true
proxy_default:
external: true