-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
114 lines (110 loc) · 2.45 KB
/
docker-compose.yaml
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
version: "3.9"
networks:
laravel_login_api:
services:
server:
# image: 'nginx:stable-alpine'
build:
context: .
dockerfile: dockerfiles/nginx.dockerfile
ports:
- 8080:80
# - 443:443
volumes:
- ./src:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- php
- redis
- mysql
- mailhog
container_name: laravel_login_api_server
networks:
- laravel_login_api
# extra_hosts:
# - "host.docker.internal:host-gateway"
php:
build:
context: .
dockerfile: dockerfiles/php.dockerfile
volumes:
- ./src:/var/www/html:delegated
container_name: php_laravel_login_api
networks:
- laravel_login_api
mysql:
image: mysql:8.0.1
restart: unless-stopped
tty: true
container_name: mysql_laravel_login_api
env_file:
- mysql/.env
ports:
- 3306:3306
networks:
- laravel_login_api
volumes:
- /opt/mysql_data:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
restart: always
container_name: phpmyadmin_laravel_login_api
depends_on:
- mysql
ports:
- '8891:80'
environment:
- PMA_HOST=mysql
- PMA_USER=root
- PMA_PASSWORD=secret
networks:
- laravel_login_api
redis:
image: redis:alpine
container_name: redis_laravel_login_api
restart: unless-stopped
ports:
- 6379:6379
networks:
- laravel_login_api
command: redis-server --appendonly yes --replica-read-only no
composer:
build:
context: ./dockerfiles
dockerfile: composer.dockerfile
volumes:
- ./src:/var/www/html
depends_on:
- php
networks:
- laravel_login_api
artisan:
build:
context: .
dockerfile: dockerfiles/php.dockerfile
volumes:
- ./src:/var/www/html
entrypoint: ["php", "/var/www/html/artisan"]
#depends_on:
#- mysql
networks:
- laravel_login_api
scheduler:
build:
context: .
dockerfile: dockerfiles/php.dockerfile
container_name: scheduler_laravel_login_api
volumes:
- ./src:/var/www/html
working_dir: /var/www/html
entrypoint: [ "php", "artisan", "schedule:work" ]
networks:
- laravel_login_api
mailhog:
image: mailhog/mailhog:latest
container_name: mailhog_laravel_login_api
ports:
- 1025:1025
- 8025:8025
networks:
- laravel_login_api