forked from systemsdk/docker-nginx-php-symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (76 loc) · 2.04 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
79
80
81
82
83
version: '3.5'
services:
nginx:
image: ${COMPOSE_PROJECT_NAME}_nginx:latest
build:
context: ./docker/
args:
- "BUILD_ARGUMENT_ENV=dev"
dockerfile: ./nginx/Dockerfile
container_name: ${COMPOSE_PROJECT_NAME}_nginx
restart: always
ports:
- 80:80
- 443:443
volumes:
- .:/var/www/html:ro
depends_on:
- symfony
networks:
- symfony
symfony: &symfony-template
image: ${COMPOSE_PROJECT_NAME}_symfony:latest
build:
context: .
args:
- "BUILD_ARGUMENT_ENV=dev"
- "BUILD_ARGUMENT_DEBUG_ENABLED=false"
dockerfile: ./Dockerfile
container_name: ${COMPOSE_PROJECT_NAME}_symfony
volumes:
- .:/var/www/html
depends_on:
- mysql
- rabbitmq
networks:
- symfony
### Cron tasks, RabbitMQ consumers
supervisord:
<<: *symfony-template
container_name: ${COMPOSE_PROJECT_NAME}_supervisord
expose: []
command: ["/usr/bin/supervisord"]
mysql:
image: mysql:8.0
container_name: ${COMPOSE_PROJECT_NAME}_mysql
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=symfony
ports:
- 33061:3306
volumes:
- ./var/mysql-data:/var/lib/mysql
- ./docker/dev/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
networks:
- symfony
rabbitmq:
image: ${COMPOSE_PROJECT_NAME}_rabbitmq
build:
context: ./docker/rabbitmq/
dockerfile: ./Dockerfile
container_name: ${COMPOSE_PROJECT_NAME}_rabbitmq
environment:
- RABBITMQ_ERLANG_COOKIE=7ead507151fc4461b9f45c1161384a04
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
- RABBITMQ_DEFAULT_VHOST=/
ports:
- 15672:15672
volumes:
- ./var/rabbitmq:/var/lib/rabbitmq
networks:
- symfony
networks:
symfony:
name: symfony