-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
73 lines (68 loc) · 2.09 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
networks:
soketi-network:
name: soketi-app-manager-network
driver: bridge
services:
soketi-app-manager:
build:
context: ./docker
dockerfile: Dockerfile
image: soketi-app-manager
container_name: soketi-app-manager
depends_on:
mysql:
condition: service_healthy # Important for auto database migration
volumes:
- '.:/var/www/html'
networks:
- soketi-network
nginx:
image: 'nginx:stable-alpine3.17-slim'
container_name: soketi-app-manager-nginx
depends_on:
- soketi-app-manager
- soketi
volumes:
- './docker/nginx.conf:/etc/nginx/conf.d/default.conf'
- '.:/var/www/html'
ports:
- '${APP_PORT:-80}:80'
networks:
- soketi-network
mysql:
image: 'mysql/mysql-server:8.0'
container_name: soketi-app-manager-mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
volumes:
- './docker/data/mysql:/var/lib/mysql'
networks:
- soketi-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-u", "${DB_USERNAME}", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
interval: 5s
redis:
image: 'redis:7.2-alpine'
container_name: soketi-app-manager-redis
command: redis-server --save 60 1 --loglevel warning --requirepass "${REDIS_PASSWORD}"
volumes:
- './docker/data/redis:/data'
networks:
- soketi-network
soketi:
image: 'quay.io/soketi/soketi:latest-16-alpine'
container_name: soketi-websocket-server
depends_on:
- mysql
- redis
volumes:
- './.env:/app/.env'
networks:
- soketi-network