-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-dev.yml
83 lines (75 loc) · 2 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Example Dev Environment Setup
name: ls_dev
services:
# Laravel App
ls_dev_app:
build:
context: .
dockerfile: ./.docker/local/Dockerfile
container_name: ls_dev_app
restart: on-failure
ports:
- ${APP_PORT}:8080
volumes:
- ./:/var/www/html
environment:
RUN_LARAVEL_AUTOMATIONS: 'true'
AUTORUN_ENABLED: 'true'
AUTORUN_LARAVEL_STORAGE_LINK: 'true'
SSL_MODE: 'off'
PHP_POOL_NAME: 'app_pool'
PHP_OPCACHE_ENABLE: '1'
networks:
- ls_dev_app_net
- ls_dev_redis_net
command: ['php', '/var/www/html/artisan', 'schedule:work']
# Database
ls_dev_db:
image: mysql:latest
container_name: ls_dev_db
restart: unless-stopped
ports:
- 3307:3306
volumes:
- ls_dev_db_volume:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_DATABASE}
ON_CREATE_DB: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
networks:
- ls_dev_app_net
# Redis
ls_dev_redis:
image: redis:alpine
container_name: ls_dev_redis
hostname: laravel_app_x
restart: always
ports:
- ${REDIS_PORT}:6379
networks:
- ls_dev_redis_net
# MailHog Server
ls_dev_mail_hog:
image: mailhog/mailhog:latest
container_name: ls_dev_mail_hog
restart: unless-stopped
ports:
- 10001:1025
- 10002:8025
networks:
ls_dev_app_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.20.0.0/16
ls_dev_redis_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.50.0.0/16
volumes:
ls_dev_db_volume: