This repository has been archived by the owner on Mar 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
74 lines (67 loc) · 1.47 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
version: "3.7"
networks:
laravel:
volumes:
database:
services:
database:
image: mysql:latest
container_name: ${DB_HOST}
restart: "no"
volumes:
- ./docker/database/init:/docker-entrypoint-initdb.d
- database:/var/lib/mysql
networks:
- laravel
ports:
- ${DB_EXT_PORT}:${DB_PORT}
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
command: --default-authentication-plugin=mysql_native_password
composer:
image: composer:latest
container_name: composer
volumes:
- ./:/app
working_dir: /app
command: composer install
node:
image: node:lts
container_name: node
volumes:
- ./:/app
working_dir: /app
command: yarn install
app:
container_name: app
restart: "no"
volumes:
- ./:/var/www
- ./docker/app/entrypoint.sh:/entrypoint.sh
networks:
- laravel
depends_on:
- composer
- node
build:
context: .
dockerfile: ./docker/app/dockerfile
entrypoint: /entrypoint.sh
command: php-fpm
webserver:
image: nginx:stable
container_name: webserver
restart: "no"
volumes:
- ./:/var/www
- ./docker/webserver/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- laravel
ports:
- ${WEBSERVER_EXT_PORT}:${WEBSERVER_PORT}
depends_on:
- database
- app