-
Notifications
You must be signed in to change notification settings - Fork 71
/
docker-compose-production.yml
125 lines (123 loc) · 4.89 KB
/
docker-compose-production.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: '3'
services:
manager-nginx:
image: ${REGISTRY_ADDRESS}/manager-nginx:${IMAGE_TAG}
restart: always
depends_on:
- manager-php-fpm
ports:
- "80:80"
manager-php-fpm:
image: ${REGISTRY_ADDRESS}/manager-php-fpm:${IMAGE_TAG}
restart: always
environment:
APP_SECRET: ${MANAGER_APP_SECRET}
DATABASE_URL: pgsql://app:${MANAGER_DB_PASSWORD}@manager-postgres:5432/app
REDIS_HOST: manager-redis
REDIS_PASSWORD: ${MANAGER_REDIS_PASSWORD}
MAILER_URL: ${MANAGER_MAILER_URL}
OAUTH_FACEBOOK_SECRET: ${MANAGER_OAUTH_FACEBOOK_SECRET}
STORAGE_BASE_URL: ${STORAGE_BASE_URL}
STORAGE_FTP_HOST: ${STORAGE_FTP_HOST}
STORAGE_FTP_USERNAME: ${STORAGE_FTP_USERNAME}
STORAGE_FTP_PASSWORD: ${STORAGE_FTP_PASSWORD}
MESSENGER_TRANSPORT_DSN: redis://manager-redis:6379/messages?password=${MANAGER_REDIS_PASSWORD}
CENTRIFUGO_WS_HOST: ${CENTRIFUGO_WS_HOST}
CENTRIFUGO_API_HOST: http://centrifugo:8000
CENTRIFUGO_API_KEY: ${CENTRIFUGO_API_KEY}
CENTRIFUGO_SECRET: ${CENTRIFUGO_SECRET}
OAUTH_ENCRYPTION_KEY: ${OAUTH_ENCRYPTION_KEY}
depends_on:
- manager-postgres
- manager-redis
- manager-queue-redis
- centrifugo
manager-php-cli:
image: ${REGISTRY_ADDRESS}/manager-php-cli:${IMAGE_TAG}
environment:
APP_SECRET: ${MANAGER_APP_SECRET}
DATABASE_URL: pgsql://app:${MANAGER_DB_PASSWORD}@manager-postgres:5432/app
REDIS_HOST: manager-redis
REDIS_PASSWORD: ${MANAGER_REDIS_PASSWORD}
MAILER_URL: ${MANAGER_MAILER_URL}
OAUTH_FACEBOOK_SECRET: ${MANAGER_OAUTH_FACEBOOK_SECRET}
STORAGE_BASE_URL: ${STORAGE_BASE_URL}
STORAGE_FTP_HOST: ${STORAGE_FTP_HOST}
STORAGE_FTP_USERNAME: ${STORAGE_FTP_USERNAME}
STORAGE_FTP_PASSWORD: ${STORAGE_FTP_PASSWORD}
MESSENGER_TRANSPORT_DSN: redis://manager-queue-redis:6379/messages
CENTRIFUGO_WS_HOST: ${CENTRIFUGO_WS_HOST}
CENTRIFUGO_API_HOST: http://centrifugo:8000
CENTRIFUGO_API_KEY: ${CENTRIFUGO_API_KEY}
CENTRIFUGO_SECRET: ${CENTRIFUGO_SECRET}
OAUTH_ENCRYPTION_KEY: ${OAUTH_ENCRYPTION_KEY}
depends_on:
- manager-postgres
- manager-redis
- manager-queue-redis
- centrifugo
manager-queue-worker:
image: ${REGISTRY_ADDRESS}/manager-php-cli:${IMAGE_TAG}
environment:
APP_SECRET: ${MANAGER_APP_SECRET}
DATABASE_URL: pgsql://app:${MANAGER_DB_PASSWORD}@manager-postgres:5432/app
REDIS_HOST: manager-redis
REDIS_PASSWORD: ${MANAGER_REDIS_PASSWORD}
MAILER_URL: ${MANAGER_MAILER_URL}
OAUTH_FACEBOOK_SECRET: ${MANAGER_OAUTH_FACEBOOK_SECRET}
STORAGE_BASE_URL: ${STORAGE_BASE_URL}
STORAGE_FTP_HOST: ${STORAGE_FTP_HOST}
STORAGE_FTP_USERNAME: ${STORAGE_FTP_USERNAME}
STORAGE_FTP_PASSWORD: ${STORAGE_FTP_PASSWORD}
MESSENGER_TRANSPORT_DSN: redis://manager-queue-redis:6379/messages
CENTRIFUGO_WS_HOST: ${CENTRIFUGO_WS_HOST}
CENTRIFUGO_API_HOST: http://centrifugo:8000
CENTRIFUGO_API_KEY: ${CENTRIFUGO_API_KEY}
CENTRIFUGO_SECRET: ${CENTRIFUGO_SECRET}
OAUTH_ENCRYPTION_KEY: ${OAUTH_ENCRYPTION_KEY}
depends_on:
- manager-postgres
- manager-redis
- manager-queue-redis
- centrifugo
command: sh -c "sleep 30 && php bin/console messenger:consume async -vv"
manager-postgres:
image: ${REGISTRY_ADDRESS}/manager-postgres:${IMAGE_TAG}
restart: always
volumes:
- manager-postgres:/var/lib/postgresql/data
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: ${MANAGER_DB_PASSWORD}
POSTGRES_DB: app
manager-redis:
image: redis:5.0-alpine
restart: always
volumes:
- manager-redis:/data
command:
- 'redis-server'
- '--databases 2'
- '--save 900 1'
- '--save 300 10'
- '--save 60 10000'
- '--requirepass ${MANAGER_REDIS_PASSWORD}'
manager-queue-redis:
image: redis:5.0-alpine
volumes:
- manager-queue-redis:/data
centrifugo:
image: ${REGISTRY_ADDRESS}/centrifugo:${IMAGE_TAG}
ulimits:
nofile:
soft: 65536
hard: 65536
environment:
CENTRIFUGO_SECRET: ${CENTRIFUGO_SECRET}
CENTRIFUGO_API_KEY: ${CENTRIFUGO_API_KEY}
ports:
- "8000:8000"
volumes:
manager-postgres:
manager-redis:
manager-queue-redis: