-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (51 loc) · 1.07 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
version: "3.8"
services:
app:
build:
context: ./
dockerfile: ./docker/php/Dockerfile
container_name: app
volumes:
- ./:/code
depends_on:
- mysql
- redis
nginx:
image: nginx:latest
container_name: nginx
hostname: nginx
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./:/code
ports:
- "8000:80"
links:
- "app"
mysql:
platform: linux/x86_64 # for apple silicon
image: mysql:8.0.23
container_name: mysql
hostname: mysql
ports:
- "3333:3306"
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_USER=user
- MYSQL_PASSWORD=password
- MYSQL_DATABASE=laravel
volumes:
- mysql_data:/var/lib/mysql
- mysql_config:/etc/mysql/conf.d
redis:
image: redis:6.0-alpine
container_name: redis
hostname: redis
restart: always
ports:
- "6340:6379"
volumes:
- ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf
volumes:
mysql_data:
mysql_config: