-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (62 loc) · 1.67 KB
/
docker-compose.yml
File metadata and controls
68 lines (62 loc) · 1.67 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
version: '3'
services:
web:
image: nginx:1.20.2-alpine
ports:
- 3030:80
- 3001:81
volumes:
- ./php.nginx.conf:/etc/nginx/conf.d/default.conf
- ./app:/app
depends_on:
- php
php:
build:
context: .
dockerfile: php.Dockerfile
volumes:
- ./app:/app
ports:
- 3037:9003
depends_on:
- mysql
command: >
sh -cx "wait-for mysql:3306 -t 0 &&
composer install --ignore-platform-reqs &&
composer dump-autoload &&
./vendor/bin/propel migration:up; php-fpm -F -R"
# composer install --ignore-platform-reqs &&
# composer dump-autoload
# sh -cx "php-fpm -F -R &&
# wait-for mysql:3306 -- ./vendor/bin/propel migration:up"
# ["sh", "-cx", "php-fpm", "-F", "-R", "&&", "./vendor/bin/propel", "migration:up"]
# command: ["/bin/bash", "-c", "./vendor/bin/propel migration:up && php-fpm -F -R"]
# - ["php-fpm", "-F", "-R"]
mysql:
image: mariadb:10.7.3-focal
environment:
MYSQL_ROOT_PASSWORD: 'toor'
MYSQL_USER: 'tester'
MYSQL_PASSWORD: 'secret'
MYSQL_DATABASE: 'database_dev'
character_set_server: "utf8mb4"
collation_server: 'utf8mb4_unicode_ci'
volumes:
- mysqldata:/var/lib/mysql
ports:
- 3306:3306
# command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
client:
build:
context: .
dockerfile: client.Dockerfile
volumes:
- ./client:/client
# todo: enviroment VITE_URL=http://localhost:3030
ports:
- 3031:80
depends_on:
- web
# to not store with project
volumes:
mysqldata: {}