-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
79 lines (78 loc) · 2.05 KB
/
docker-compose.yml
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
version: "2.9"
services:
app:
build:
context: ./bin/app
container_name: ${COMPOSER_PROJECT_NAME}_app
working_dir: /usr/share/nginx/html
restart: always
networks:
- container_default
volumes:
- ${DOCUMENT_ROOT-./www}:/usr/share/nginx/html
- ./config/php/php.ini:/usr/local/etc/php/conf.d/custom.ini
- ./config/php/dev.ini:/usr/local/etc/php/conf.d/dev.ini
expose:
- "9000"
command: sh -c " if [ ! -d "vendor" ]; then export XDEBUG_MODE=off && composer install --ignore-platform-reqs; fi && chmod +x /usr/share/nginx/html/docs/scripts/bash/websocket_server.sh && php-fpm "
mysql:
build:
context: ./bin/mysql
container_name: ${COMPOSER_PROJECT_NAME}_database
restart: always
links:
- app
depends_on:
- app
ports:
- "8081:3306"
networks:
- container_default
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ${MYSQL_PATH-./config/mysql/mysql/}:/var/lib/mysql
- ${MYSQL_LOGS-./logs/mysql/}:/var/log/mysql
- ./www/docs/scripts/sql/schema.sql:/data/application/schema.sql
command: --init-file /data/application/schema.sql
websocket:
build:
context: ./bin/websocket
container_name: ${COMPOSER_PROJECT_NAME}_websocket
working_dir: /usr/share/nginx/html
restart: on-failure
depends_on:
- app
networks:
- container_default
volumes_from:
- app
ports:
- "8080:8080"
command: docs/scripts/bash/websocket_server.sh
redis:
build:
context: ./bin/redis
container_name: ${COMPOSER_PROJECT_NAME}_redis
networks:
- container_default
nginx:
build:
context: ./bin/nginx
container_name: ${COMPOSER_PROJECT_NAME}_webserver
links:
- app
depends_on:
- app
ports:
- "80:80"
networks:
- container_default
volumes_from:
- app
volumes:
- ${VHOSTS_DIR-./config/nginx/sites-enabled}:/etc/nginx/conf.d
- ${LOG_DIR-./logs/nginx}:/var/log/nginx
networks:
container_default:
external: true