-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (84 loc) · 2.15 KB
/
docker-compose.yml
File metadata and controls
92 lines (84 loc) · 2.15 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
services:
nginx:
build:
context: ./docker/nginx
volumes:
- ./app:/symfony
- .env:/symfony/.env
- .env.local:/symfony/.env.local
container_name: $PROJECT_NAME-nginx
restart: always
ports:
- "8081:80"
php-fpm:
build:
context: ./docker/php-fpm
volumes:
- ./app:/symfony
- .env:/symfony/.env
- .env.local:/symfony/.env.local
restart: always
container_name: $PROJECT_NAME-php-fpm
depends_on:
- mysql
php-cli:
build:
context: ./docker/php-cli
volumes:
- ./app:/symfony
- .env:/symfony/.env
- .env.local:/symfony/.env.local
# command: sleep 10000
# command: composer install --no-interaction --no-plugins --no-scripts && sleep infinity
command: bash -c "composer install --no-interaction --no-plugins --no-scripts && composer update && sleep infinity"
container_name: $PROJECT_NAME-php-cli
mysql:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./mysql:/var/lib/mysql
container_name: $PROJECT_NAME-mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_DATABASE: $MYSQL_DATABASE
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8080:80"
restart: always
environment:
PMA_HOST: mysql
PMA_USER: root
PMA_PASSWORD: $MYSQL_ROOT_PASSWORD
depends_on:
mysql:
condition: service_healthy
angular:
build:
context: ./panier
container_name: $PROJECT_NAME-angular
restart: always
ports:
- "4200:8080"
depends_on:
- phpmyadmin
backup:
image: mysql:8.0
volumes:
- ./backups:/backups
depends_on:
- mysql
command: >
bash -c "while true; do
mysqldump -h mysql -u root -p${MYSQL_ROOT_PASSWORD} --all-databases > /backups/backup-$$(date +%Y-%m-%d-%H-%M-%S).sql;
sleep 86400;
done"
volumes:
mysql: