-
-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (90 loc) · 2.1 KB
/
docker-compose.yml
File metadata and controls
90 lines (90 loc) · 2.1 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
services:
caddy:
build:
context: ./dockerfiles/caddy
args:
- APP_ENV=$APP_ENV
- APP_URL=$APP_URL
restart: unless-stopped
volumes:
- .:/var/www/
- ./dockerfiles/caddy/data/config:/config
- ./dockerfiles/caddy/data/data:/data
ports:
- "80:80"
- "443:443"
depends_on:
- php
env_file: .env
php:
build:
context: ./dockerfiles/php
args:
- APP_ENV=$APP_ENV
- PHP_XDEBUG=$PHP_XDEBUG
- PHP_XDEBUG_MODE=$PHP_XDEBUG_MODE
restart: unless-stopped
volumes:
- .:/var/www/
expose:
- 9000
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
env_file: .env
extra_hosts:
host.docker.internal: host-gateway
workspace:
build:
context: ./dockerfiles/workspace
args:
- PHP_XDEBUG=$PHP_XDEBUG
- PHP_XDEBUG_MODE=$PHP_XDEBUG_MODE
tty: true
ports:
- "127.0.0.1:1234:1234"
volumes:
- .:/var/www/
extra_hosts:
host.docker.internal: host-gateway
workers:
build:
context: ./dockerfiles/workers
args:
- APP_ENV=$APP_ENV
restart: unless-stopped
volumes:
- .:/var/www/
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
redis:
image: redis:7.0-alpine
restart: unless-stopped
command: redis-server --save 60 1 --loglevel notice --requirepass '${REDIS_PASSWORD}'
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
healthcheck:
test: redis-cli -a $$REDIS_PASSWORD ping | grep PONG
interval: 5s
timeout: 5s
retries: 20
database:
image: mysql:8.0
restart: unless-stopped
volumes:
- ./dockerfiles/mysql/data:/var/lib/mysql/
environment:
MYSQL_RANDOM_ROOT_PASSWORD: true
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: mysqladmin ping -u$$MYSQL_USER -p$$MYSQL_PASSWORD
interval: 5s
timeout: 5s
retries: 20