-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-dev.yml
62 lines (56 loc) · 1.24 KB
/
docker-compose-dev.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
version: "3.8"
services:
# Laravel App X
laravel_app_x:
build:
context: ./src
container_name: laravel_app_x
restart: unless-stopped
ports:
- ${LARAVEL_APP_X_PORT}:8000
volumes:
- ./src:/var/www/html
environment:
RUN_LARAVEL_AUTOMATIONS: "true"
command: php -S laravel_app_x:8000 -t ./public
networks:
- mysql_net
- redis_net
# MySQL
laravel_mysql_db:
image: mysql:latest
container_name: laravel_mysql_db
restart: unless-stopped
ports:
- ${MYSQL_PORT}:3306
environment:
MYSQL_DATABASE: ${MYSQL_DB}
ON_CREATE_DB: ${MYSQL_DB}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
networks:
- mysql_net
# Redis
laravel_redis:
image: redis:alpine
container_name: laravel_redis
hostname: laravel_app_x
restart: always
ports:
- ${LARAVEL_REDIS_POST}:6379
networks:
- redis_net
# MailHog Server
laravel_mail_hog:
image: mailhog/mailhog:latest
container_name: laravel_mail_hog
restart: unless-stopped
ports:
- 10001:1025
- 10002:8025
networks:
mysql_net:
driver: bridge
redis_net:
driver: bridge