-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
100 lines (92 loc) · 1.99 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
96
97
98
99
100
services:
nginx:
build:
context: ./docker/nginx
dockerfile: Dockerfile
image: nginx
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./www:/var/www/html/
- ./volumes/socket:/socket
- /etc/letsencrypt:/etc/letsencrypt
environment:
DOMAIN: ${DOMAIN}
depends_on:
- php
networks:
- dev-net
php:
build:
context: ./docker/php-fpm
dockerfile: Dockerfile
image: php-fpm # имя будущего образа
container_name: php # имя контейнера после запуска
volumes:
- ./www:/var/www/html/
- ./volumes/socket:/socket
environment:
MYSQL_HOST: ${MYSQL_HOST}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
depends_on:
- mysql
networks:
- dev-net
mysql:
build:
context: ./docker/mysql
dockerfile: Dockerfile
image: mysql
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
ports:
- "3306:3306"
volumes:
- ./volumes/mysql:/var/db/mysql/mysql
networks:
- dev-net
php-cli:
build:
context: ./docker/php-cli
dockerfile: Dockerfile
image: php-cli
container_name: php-cli
environment:
MYSQL_HOST: ${MYSQL_HOST}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
depends_on:
- mysql
- rabbitmq
links:
- rabbitmq
networks:
- dev-net
rabbitmq:
image: rabbitmq:3.13.2-management
hostname: rabbitmq
volumes:
- ./volumes/rabbitmq:/var/lib/rabbitmq
ports:
- 15672:15672
networks:
- dev-net
swagger-ui:
image: swaggerapi/swagger-ui
hostname: swagger
ports:
- "8080:8080"
volumes:
- ./volumes/swagger/swagger.yaml:/swagger.yaml
environment:
SWAGGER_JSON: /swagger.yaml
networks:
- dev-net
#Docker Networks
networks:
dev-net:
driver: bridge