-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
48 lines (48 loc) · 1 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
version: '3.8'
services:
nginx:
build:
context: .
dockerfile: nginx.dockerfile
ports:
- '${APP_PORT:-80}:80'
depends_on:
- database
- php
database:
image: mariadb:10.5
ports:
- '${DB_PORT:-3306}:3306'
volumes:
- 'hope-database:/var/lib/mysql'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 1
php:
build:
context: .
dockerfile: php.dockerfile
volumes:
- .:/var/www/html
composer:
image: composer:2
working_dir: /var/www/html
volumes:
- .:/var/www/html
artisan:
build:
context: .
dockerfile: php.dockerfile
volumes:
- .:/var/www/html
working_dir: /var/www/html
entrypoint: [ "php", "/var/www/html/artisan" ]
depends_on:
- database
volumes:
hope-database:
driver: local