-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
121 lines (111 loc) · 3.9 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: '2.4'
services:
data:
image: busybox:latest
volumes:
- .:/var/www/project
- ./docker/fpm/etc/php/8.0/cli/php.ini:/etc/php/8.0/cli/php.ini
- ./docker/fpm/etc/php/8.0/fpm/pool.d/www.conf:/etc/php/8.0/fpm/pool.d/www.conf
- ./docker/fpm/etc/php/8.0/fpm/pool.d/z-overrides.conf:/etc/php/8.0/fpm/pool.d/z-overrides.conf
php:
image: streakphp/php80-cli:latest
working_dir: /var/www/project
volumes_from:
- data
environment:
COMPOSER_ALLOW_SUPERUSER: 1
COMPOSER_NO_INTERACTION: 1
COMPOSER_CACHE_DIR: /var/www/project/build/.composer
depends_on:
- postgres_event_store
- postgres_registered_users_projections
- mysql_projects_projections
- redis
- rabbitmq
fpm:
image: streakphp/php80-fpm:latest
working_dir: /var/www/project
volumes_from:
- data
environment:
COMPOSER_ALLOW_SUPERUSER: 1
COMPOSER_NO_INTERACTION: 1
COMPOSER_CACHE_DIR: /var/www/project/build/.composer
depends_on:
- postgres_event_store
- postgres_registered_users_projections
- mysql_projects_projections
- redis
- rabbitmq
nginx:
image: nginx:latest
working_dir: /var/www/project
volumes:
- .:/var/www/project
- ./docker/nginx/etc/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- fpm
ports:
- 8080:80
redis:
image: redis:alpine
command: redis-server
volumes:
- ./docker/redis/usr/local/etc/redis/redis.conf:/usr/local/etc/redis/redis.conf
ports:
- 6380:6379
postgres_event_store:
image: postgres:13-alpine
environment:
POSTGRES_USER: ${EVENT_STORE_POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${EVENT_STORE_POSTGRES_PASSWORD}
POSTGRES_DB: ${EVENT_STORE_POSTGRES_DATABASE}
volumes:
- ./docker/postgres/usr/local/share/postgresql/postgresql.conf:/usr/local/share/postgresql/postgresql.conf
ports:
- 5433:5432
postgres_registered_users_projections:
image: postgres:13-alpine
environment:
POSTGRES_USER: ${REGISTERED_USERS_PROJECTIONS_POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${REGISTERED_USERS_PROJECTIONS_POSTGRES_PASSWORD}
POSTGRES_DB: ${REGISTERED_USERS_PROJECTIONS_POSTGRES_DATABASE}
volumes:
- ./docker/postgres/usr/local/share/postgresql/postgresql.conf:/usr/local/share/postgresql/postgresql.conf
ports:
- 5434:5432
mysql_projects_projections:
image: mysql:8
environment:
MYSQL_ROOT_PASSWORD: ${PROJECTS_PROJECTIONS_MYSQL_PASSWORD}
MYSQL_DATABASE: ${PROJECTS_PROJECTIONS_MYSQL_DATABASE}
MYSQL_USER: ${PROJECTS_PROJECTIONS_MYSQL_USERNAME}
MYSQL_PASSWORD: ${PROJECTS_PROJECTIONS_MYSQL_PASSWORD}
volumes:
- ./docker/mysql/etc/mysql/conf.d/mysql.cnf:/etc/mysql/conf.d/mysql.cnf
ports:
- 3307:3306
rabbitmq:
image: rabbitmq:3.8-management-alpine # version 3.9 and above do not support docker environment variables specified below
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USERNAME}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}
RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_VHOST}
volumes:
- .:/var/www/project
- ./docker/rabbitmq/etc/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins
- ./docker/rabbitmq/etc/rabbitmq/conf.d/todocler.conf:/etc/rabbitmq/conf.d/todocler.conf
- ./docker/rabbitmq/opt/rabbitmq/plugins/elixir-1.10.4.ez:/opt/rabbitmq/plugins/elixir-1.10.4.ez
- ./docker/rabbitmq/opt/rabbitmq/plugins/rabbitmq_message_deduplication-0.5.0.ez:/opt/rabbitmq/plugins/rabbitmq_message_deduplication-0.5.0.ez
ports:
- 5673:5672
- 15673:15672
supervisord:
build:
context: .
dockerfile: docker/supervisord/Dockerfile
privileged: true
volumes:
- .:/var/www/project
- ./docker/supervisord/etc/supervisord.conf:/etc/supervisord.conf
- /var/run/docker.sock:/var/run/docker.sock