-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
120 lines (119 loc) · 2.6 KB
/
docker-compose.yml
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
115
116
117
118
119
120
---
x-environment: &env
DB_HOST: mariadb
REDIS_HOST: redis
REDIS_PASSWORD: ""
CACHE_DRIVER: redis
SESSION_DRIVER: redis
QUEUE_CONNECTION: redis
MAIL_MAILER: mailpit
REVERB_SCHEME: http
REVERB_HOST: reverb
REVERB_PORT: 6001
services:
php-fpm:
build:
target: php-fpm
secrets:
- .env
volumes:
- php-fpm-socket:/var/run/php
- .docker/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.d/zz-docker.conf
secrets:
- source: .env
target: /var/www/.env
depends_on:
- mariadb
- redis
environment:
<<: *env
restart: unless-stopped
init: true
develop:
watch:
- action: sync
path: ./app
target: /var/www/app
- action: sync
path: ./database
target: /var/www/database
queue-worker:
extends: php-fpm
command: php artisan queue:work
schedule-worker:
extends: php-fpm
command: php artisan schedule:work
reverb:
extends: php-fpm
command: php artisan reverb:start
environment:
REVERB_SERVER_HOST: 0.0.0.0
REVERB_SERVER_PORT: 6001
caddy:
build:
target: caddy
secrets:
- .env
volumes:
- caddy-config:/config
- caddy-data:/data
- php-fpm-socket:/var/run/php
- .docker/caddy:/etc/caddy
- .docker/caddy/Caddyfile.${APP_SCHEME:-https}:/etc/caddy/Caddyfile
depends_on:
- php-fpm
- queue-worker
- schedule-worker
- reverb
environment:
APP_URL: ${APP_URL?}
ports:
- ${APP_PORT:-8000}:${APP_PORT:-8000}
mariadb:
image: mariadb:10
environment:
MARIADB_RANDOM_ROOT_PASSWORD: true
MARIADB_DATABASE: ${DB_DATABASE:-bibroomz}
MARIADB_USER: ${DB_USERNAME:-bibroomz}
MARIADB_PASSWORD: ${DB_PASSWORD?}
volumes:
- mariadb-data:/var/lib/mysql
- .docker/mariadb/schema.sql:/docker-entrypoint-initdb.d/schema.sql
healthcheck:
test: healthcheck.sh --connect --innodb_initialized
interval: 5s
start_period: 5s
# ports:
# - 3306:3306
redis:
image: redis:7
volumes:
- redis-data:/data
healthcheck:
test: redis-cli ping
interval: 5s
start_period: 5s
# ports:
# - 6379:6379
mailpit:
image: axllent/mailpit
environment:
MP_DATABASE: /data/mailpit.db
MP_WEBROOT: /mailpit
volumes:
- mailpit-data:/data
healthcheck:
disable: true
# ports:
# - 1025:1025
# - 8025:8025
volumes:
caddy-config:
caddy-data:
mailpit-data:
mariadb-data:
php-fpm-socket:
redis-data:
secrets:
.env:
file: .env