-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
39 lines (36 loc) · 862 Bytes
/
docker-compose.dev.yml
File metadata and controls
39 lines (36 loc) · 862 Bytes
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
services:
php:
build: ./code/
expose:
- 9000
websocket:
build: ./code/
command: sh -c "composer install && php /var/www/html/ws/Ws.php"
ports:
- "8080:8080"
depends_on:
- db
db:
image: mysql:latest
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: pass123
MYSQL_DATABASE: mydb
MYSQL_USER: myuser
MYSQL_PASSWORD: pass123
ports:
- "3306:3306"
restart: unless-stopped
volumes:
- ./mysql:/docker-entrypoint-initdb.d
nginx:
build:
context: .
dockerfile: ./nginx/Dockerfile
ports:
- 80:80
volumes: # Add this section
- ./code:/var/www/html # Mount your local code directory into Nginx's web root
depends_on:
- websocket
- php # Add php dependency to ensure php is up before nginx tries to connect