-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
67 lines (63 loc) · 1.64 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
services:
nginx:
build:
context: .
dockerfile: ./docker/dockerfiles/nginx/Dockerfile
target: dev
container_name: ${COMPOSE_PROJECT_NAME}-nginx
restart: unless-stopped
ports:
- "${APP_WEB_PORT}:80"
volumes:
- ./:${APP_PATH}
depends_on:
- php
php:
build:
args:
user: ${DOCKER_USER}
uid: 1000
target: dev
context: .
dockerfile: ./docker/dockerfiles/php/Dockerfile
target: dev
container_name: ${COMPOSE_PROJECT_NAME}-php
#command: sh -c "/usr/./wait-for-it.sh mysql:3306 -t 30 && /usr/./wait-for-it.sh redis:6379 -t 30 && cd /var/www/app/ && composer install --no-scripts && /usr/./update.sh && php-fpm"
restart: unless-stopped
volumes:
- ./:${APP_PATH}
depends_on:
- db
- redis
db:
container_name: ${COMPOSE_PROJECT_NAME}-db
build:
context: .
dockerfile: ./docker/dockerfiles/mysql/Dockerfile
volumes:
- ./docker/volumes/mysql:/var/lib/mysql
ports:
- "${APP_MYSQL_PORT}:3306"
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASS}
redis:
container_name: ${COMPOSE_PROJECT_NAME}-redis
image: redis:7.0.11-alpine
restart: unless-stopped
volumes:
- ./docker/volumes/redis:/data
ports:
- "${APP_REDIS_PORT}:6379"
npm:
build:
context: .
dockerfile: ./docker/dockerfiles/node/Dockerfile
container_name: ${COMPOSE_PROJECT_NAME}-npm
volumes:
- ./:${APP_PATH}:cached
- ./.env:${APP_PATH}/.env
working_dir: ${APP_PATH}
profiles: ["npm"]
entrypoint: ['npm']
ports:
- ${VITE_PORT}:${VITE_PORT}