-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
164 lines (154 loc) · 3.69 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
version: "3.9"
networks:
laravel:
services:
cms:
container_name: "cms"
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile.cms
ports:
- "3001:3000"
environment:
NUXT_PUBLIC_BASE_URL: http://api.localhost/api/v1
NUXT_PUBLIC_WS_BASE_URL: http://api.localhost
NUXT_PUBLIC_WS_HOST: api.localhost
NUXT_PUBLIC_WS_PORT: 6001
NUXT_PUBLIC_WSS_PORT: 6001
NUXT_PUBLIC_KEY: app-key
labels:
- "traefik.enable=true"
- "traefik.http.routers.cms.rule=Host(`cms.localhost`)"
networks:
- laravel
cms-dev:
container_name: "cms-dev"
build:
context: .
dockerfile: Dockerfile.cms-dev
command: npm run dev:host
volumes:
- ./cms:/app
- /app/node_modules
working_dir: /app
ports:
- "3000:3000"
environment:
NUXT_PUBLIC_BASE_URL: http://api.localhost/api/v1
NUXT_PUBLIC_WS_BASE_URL: http://api.localhost
NUXT_PUBLIC_WS_HOST: api.localhost
NUXT_PUBLIC_WS_PORT: 6001
NUXT_PUBLIC_WSS_PORT: 6001
NUXT_PUBLIC_KEY: app-key
labels:
- "traefik.enable=true"
- "traefik.http.routers.cms-dev.rule=Host(`cms-dev.localhost`)"
networks:
- laravel
nginx:
image: nginx:stable-alpine
restart: always
container_name: nginx
ports:
- "8085:80"
volumes:
- ./api:/var/www/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:rw
volumes_from:
- php
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`api.localhost`)"
depends_on:
- php
- mysql
- soketi
- traefik
networks:
- laravel
mysql:
image: mysql:latest
container_name: mysql
restart: unless-stopped
tty: true
ports:
- "4036:3306"
volumes:
- ./docker/mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- laravel
php:
image: php:8.1-fpm-alpine
restart: always
build:
context: .
dockerfile: Dockerfile
container_name: php
volumes:
- ./api:/var/www/html
- ./docker/php/conf.d/php.ini:/usr/local/etc/php/php.ini
- ./docker/php/conf.d/pcov.ini:/usr/local/etc/php/conf.d/pcov.ini
ports:
- "9000:9000"
networks:
- laravel
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
container_name: phpmyadmin
depends_on:
- mysql
ports:
- "8081:80"
environment:
PMA_HOST: mysql
MYSQL_ROOT_PASSWORD: secret
labels:
- "traefik.enable=true"
- "traefik.http.routers.phpmyadmin.rule=Host(`phpmyadmin.localhost`)"
networks:
- laravel
soketi:
image: "quay.io/soketi/soketi:latest-16-alpine"
restart: always
environment:
SOKETI_DEBUG: "1"
SOKETI_METRICS_SERVER_PORT: "9601"
SOKETI_DEFAULT_APP_ENABLE_CLIENT_MESSAGES: "true"
ports:
- "${SOKETI_PORT:-6001}:6001"
- "${SOKETI_METRICS_SERVER_PORT:-9601}:9601"
networks:
- laravel
redis:
image: redis:latest
container_name: redis
restart: always
ports:
- "6379:6379"
networks:
- laravel
traefik:
image: "traefik:v2.10"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- laravel