-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
103 lines (103 loc) · 2.11 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
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
version: '3.8'
networks:
stack:
driver: bridge
volumes:
stack-mysql:
driver: local
stack-redis:
driver: local
services:
nginx:
build:
context: .docker
dockerfile: nginx.dockerfile
depends_on:
- php
- mysql
- redis
ports:
- '${APP_PORT:-80}:80'
volumes:
- .:/var/www/html
networks:
- stack
php:
build:
context: .docker
dockerfile: php.8.1.dockerfile
volumes:
- .:/var/www/html
networks:
- stack
mysql:
image: 'mysql:8.0'
ports:
- '${FORWARD_DB_PORT:-3306}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- 'stack-mysql:/var/lib/mysql'
networks:
- stack
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}" ]
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'stack-redis:/data'
networks:
- stack
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
composer:
build:
context: .docker
dockerfile: composer.dockerfile
container_name: composer
working_dir: /var/www/html
volumes:
- .:/var/www/html
networks:
- stack
artisan:
build:
context: .docker
dockerfile: php.8.1.dockerfile
container_name: artisan
working_dir: /var/www/html
entrypoint: ['php', 'artisan']
volumes:
- .:/var/www/html
networks:
- stack
phpunit:
build:
context: .docker
dockerfile: php.8.1.dockerfile
container_name: phpunit
working_dir: /var/www/html
entrypoint: ['./vendor/bin/phpunit']
volumes:
- .:/var/www/html
networks:
- stack
npm:
image: node:13.7
container_name: npm
working_dir: /var/www/html
entrypoint: ['npm']
volumes:
- .:/var/www/html
networks:
- stack