-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (58 loc) · 1.43 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
version: '3'
networks:
laravel:
driver: bridge
services:
nginx:
image: nginx:stable-alpine
restart: unless-stopped
ports:
- "${WEB_PORT}:80"
volumes:
- "${PROJECT_DIR}:/var/www/html"
- "${NGINX_CONFIG}:/etc/nginx/conf.d/default.conf"
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- php
- mysql
networks:
- laravel
mysql:
image: mysql:5.7.29
restart: unless-stopped
user: "${HOST_UID}:${HOST_GID}"
tty: true
ports:
- "${SQL_PORT}:3306"
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- ./docker/mysql:/var/lib/mysql
networks:
- laravel
php:
build:
context: ./docker
dockerfile: Dockerfile-php
user: "${HOST_UID}:${HOST_GID}"
volumes:
- "${PROJECT_DIR}:/var/www/html"
- ./docker/php/php.ini:/usr/local/etc/php/php.ini
- ./docker/php/tinker_cache:/.config/psysh
#- "${COMPOSER_CACHE_DIR}:/.composer/cache"
#- "${COMPOSER_CONFIG}:/.composer/config"
working_dir: /var/www/html
networks:
- laravel
npm:
image: node:13.7
user: "${HOST_UID}:${HOST_GID}"
volumes:
- "${PROJECT_DIR}:/var/www/html"
working_dir: /var/www/html
entrypoint: ['npm']