-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
146 lines (139 loc) · 4.11 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: "3.7"
services:
laravel:
image: xoren-io-laravel
container_name: xoren-io-laravel
restart: unless-stopped
build:
context: .
dockerfile: ./laravel/Dockerfile
args:
APP_ENV: ${APP_ENV:-production}
APP_USER: ${APP_USER:-laravel}
APP_USER_UUID: ${APP_USER_UUID:-1000}
APP_USER_GUID: ${APP_USER_GUID:-1000}
APP_TIMEZONE: ${APP_TIMEZONE:-Europe/London}
APP_ENCODE: ${APP_ENCODE:-en_GB}
working_dir: /var/www
env_file: ./.env
environment:
APP_ENV: ${APP_ENV:-production}
APP_USER: ${APP_USER:-laravel}
SWOOLE_MAX_REQUESTS: ${SWOOLE_MAX_REQUESTS:-500}
SWOOLE_TASK_WORKERS: ${SWOOLE_TASK_WORKERS:-auto}
SWOOLE_WATCH: ${SWOOLE_WATCH:-false}
SWOOLE_WORKERS: ${SWOOLE_WORKERS:-auto}
SWOOLE_PORT: ${SWOOLE_PORT:-9000}
XDEBUG_MODE: 'off'
XDEBUG_CONFIG: 'client_host=host.docker.internal'
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- ./laravel:/var/www
- ./php/php-ini-overrides.ini:/usr/local/etc/php/php.ini
networks:
- DOCKER_BRIDGE
depends_on:
- redis
- websocket
websocket:
image: xoren-io-websocket
container_name: xoren-io-websocket
restart: unless-stopped
env_file: ./.env
build:
context: ./soketi
dockerfile: Dockerfile
args:
APP_ENV: ${APP_ENV:-production}
APP_TIMEZONE: ${APP_TIMEZONE:-Europe/London}
APP_ENCODE: ${APP_ENCODE:-en_GB}
environment:
DEFAULT_APP_ID: ${PUSHER_APP_ID:-app-id}
DEFAULT_APP_KEY: ${PUSHER_APP_KEY:-app-key}
DEFALT_APP_SECRET: ${PUSHER_APP_SECRET:-app-secret}
SOKETI_DEBUG: '1'
METRICS_SERVER_PORT: '9601'
DB_REDIS_HOST: redis
DB_REDIS_PORT: 6379
DB_REDIS_DB: 3
CORS_ALLOW_HEADERS: "*"
CORS_ALLOWHEADERS: "*"
CORS_METHODS: "*"
CORS_ORIGIN: "*"
CORS_CREDENTIALS: "true"
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
networks:
- DOCKER_BRIDGE
depends_on:
- redis
nginx:
image: xoren-io-nginx
container_name: xoren-io-nginx
restart: unless-stopped
env_file: ./.env
build:
context: .
dockerfile: ./nginx/Dockerfile
args:
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
environment:
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${LANG:-en_GB}"
SWOOLE_PORT: ${SWOOLE_PORT:-8000}
NGINX_BLOCK_BOTS: 1
NGINX_BLOCK_SCANNERS: 1
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- ~/pems/dhparam.pem:/etc/nginx/dhparam.pem
- ~/pems/ssl-cert-snakeoil.key:/etc/ssl/private/ssl-cert-snakeoil.key
- ~/pems/ssl-cert-snakeoil.pem:/etc/ssl/certs/ssl-cert-snakeoil.pem
- ./laravel/public:/var/www/public
- ./laravel/storage:/var/www/storage
ports:
- 127.0.0.1:26680:80
networks:
- DOCKER_BRIDGE
redis:
image: xoren-io-redis
container_name: xoren-io-redis
restart: unless-stopped
build:
context: ./redis
dockerfile: Dockerfile
args:
APP_ENV: "${APP_ENV:-production}"
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
env_file: ./.env
environment:
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- 'REDIS_VOLUME:/data' ## save in vm
networks:
- DOCKER_BRIDGE
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
networks:
DOCKER_BRIDGE:
driver: bridge
volumes:
REDIS_VOLUME:
driver: local