forked from marein/php-gaming-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.ci.yml
100 lines (95 loc) · 3.02 KB
/
docker-compose.ci.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: '3.4'
x-php-container:
&php-container
image: marein/php-gaming-website:php-fpm
env_file: ./.env
environment:
APP_ENVIRONMENT: prod
depends_on:
- mysql
- redis
- rabbit-mq
- nchan
restart: on-failure
services:
##############################
# Database and application #
##############################
traefik:
image: marein/php-gaming-website:traefik
command:
- --providers.docker
- --providers.docker.exposedbydefault=false
depends_on:
- nchan
- php-fpm
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mysql:
image: marein/php-gaming-website:mysql
environment:
MYSQL_ROOT_PASSWORD: password
volumes:
- mysql:/var/lib/mysql
restart: on-failure
redis:
image: marein/php-gaming-website:redis
command: redis-server --appendonly yes
volumes:
- redis:/data
restart: on-failure
rabbit-mq:
image: marein/php-gaming-website:rabbit-mq
hostname: rabbit-mq
volumes:
- rabbit-mq:/var/lib/rabbitmq/mnesia
restart: on-failure
nchan:
image: marein/php-gaming-website:nchan
restart: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.routers.nchan.priority=20"
- "traefik.http.routers.nchan.rule=PathPrefix(`/sse`)"
php-fpm:
<<: *php-container
labels:
- "traefik.enable=true"
- "traefik.http.routers.php-fpm.priority=10"
- "traefik.http.routers.php-fpm.rule=PathPrefix(`/`)"
- "traefik.http.services.php-fpm.loadbalancer.server.port=80"
##############################
# Long running processes #
##############################
php-connect-four-follow-event-store:
<<: *php-container
command: bin/console connect-four:follow-event-store pointer --select-all-subscribers
php-chat-follow-event-store:
<<: *php-container
command: bin/console chat:follow-event-store pointer --select-all-subscribers
php-identity-follow-event-store:
<<: *php-container
command: bin/console identity:follow-event-store pointer --select-all-subscribers
php-consume-messages:
<<: *php-container
command: bin/console gaming:consume-messages --select-all-consumers
php-web-interface-publish-running-games-count-to-nchan:
<<: *php-container
command: bin/console web-interface:publish-running-games-count-to-nchan
##############################
# CI helper #
##############################
selenium:
image: selenium/standalone-chrome:3.14
php:
build:
context: .
dockerfile: ./docker/php-fpm/Dockerfile
entrypoint: ''
command: 'true'
volumes:
- ./tests:/project/tests:delegated
volumes:
mysql:
redis:
rabbit-mq: