-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (92 loc) · 2.22 KB
/
docker-compose.yml
File metadata and controls
93 lines (92 loc) · 2.22 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
91
92
93
x-app-build: &app-build
build:
context: ./
dockerfile: './Dockerfile.server'
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
services:
app:
<<: *app-build
user: "${UID}:${GID}"
mem_limit: 2048m
mem_reservation: 512M
container_name: '${APP_NAME}-app'
restart: 'always'
ports:
- ${APP_PORT}:80
links:
- db
- redis
volumes:
- ./app:/var/www/html
- ./docker-config:/etc/apache2/sites-enabled
- ./docker-config/php/php.ini:/usr/local/etc/php/conf.d/custom.ini
db:
mem_limit: 1024m
mem_reservation: 128M
build:
context: "./"
dockerfile: 'Dockerfile.db'
container_name: '${APP_NAME}-mysql'
restart: 'always'
ports:
- ${DATABASE_PORT}:3306
volumes:
#- ./docker/data/mysql:/var/lib/mysql
- ./docker/logs/mysql:/var/log/mysql
- ./docker-config/database/custom.cnf:/etc/mysql/conf.d/custom.cnf:ro
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
phpmyadmin:
image: phpmyadmin/phpmyadmin
mem_limit: 64m
restart: 'always'
mem_reservation: 32M
container_name: '${APP_NAME}-phpmyadmin'
links:
- db
environment:
PMA_HOST: db
PMA_PORT: 3306
UPLOAD_LIMIT: 1000000
ports:
- ${PHPMYADMIN_PORT}:80
redis:
container_name: '${APP_NAME}-redis'
image: redis:8.4.0
restart: 'always'
mem_limit: 64m
mem_reservation: 32M
ports:
- ${REDIS_PORT}:6379
scheduler:
<<: *app-build
user: "${UID}:${GID}"
container_name: '${APP_NAME}-scheduler'
mem_limit: 256m
mem_reservation: 64M
command: >
sh -c "
while [ ! -f storage/app/private/erp.installed ]; do
echo 'Waiting for ERP installation...';
done;
sleep 30;
echo 'Start schedule';
php artisan schedule:work
"
restart: unless-stopped
depends_on:
- app
- db
- redis
links:
- db
- redis
volumes:
- ./app:/var/www/html
- ./docker-config:/etc/apache2/sites-enabled
- ./docker-config/php/php.ini:/usr/local/etc/php/conf.d/custom.ini