-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
95 lines (95 loc) · 2.11 KB
/
docker-compose.yaml
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
version: '3.7'
services:
app:
build:
context: ./docker
dockerfile: Dockerfile-dev
restart: unless-stopped
volumes:
- .:/usr/src/app
command:
- bash
- -c
- |
if [ ! -f "/usr/src/init" ]; then
composer install
php artisan key:generate
sleep 15
php artisan migrate --seed
php artisan jwt:secret --always-no
touch /usr/src/init
fi
exec apache2-foreground
depends_on:
- mysql_service
queue:
build:
context: ./docker
dockerfile: Dockerfile-dev
restart: unless-stopped
volumes:
- .:/usr/src/app
command: php artisan queue:work
depends_on:
- app
- mysql_service
- redis
schedule:
build:
context: ./docker
dockerfile: Dockerfile-dev
restart: unless-stopped
volumes:
- .:/usr/src/app
command: php artisan schedule:work
depends_on:
- app
- mysql_service
- redis
mysql_service:
image: mysql:8
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
ports:
- ${DB_PORT:-3306}:3306
adminer:
image: adminer
restart: unless-stopped
environment:
- ADMINER_DEFAULT_SERVER=mysql_service
redis:
image: redis:5.0
restart: unless-stopped
ports:
- ${REDIS_PORT:-6379}:6379
nginx:
image: nginx
restart: unless-stopped
volumes:
- ./docker/nginx:/etc/nginx/templates
ports:
- ${DOCKER_PORT:-80}:80
environment:
- ADMINER_PREFIX=${DOCKER_ADMINER_PREFIX:-adminer}
- SILVERBOX_PREFIX=${DOCKER_SILVERBOX_PREFIX:-silverbox}
depends_on:
- app
silverbox:
image: heseya/silverbox:1.2.0
restart: unless-stopped
command:
- bash
- -c
- |
if [ ! -f "/usr/src/init" ]; then
php silverbox client:add ${SILVERBOX_CLIENT} ${SILVERBOX_KEY}
chown -R www-data:www-data storage
touch /usr/src/init
fi
exec apache2-foreground
networks:
default:
aliases:
- ${SILVERBOX_HOST}