-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (66 loc) · 1.98 KB
/
docker-compose.yml
File metadata and controls
67 lines (66 loc) · 1.98 KB
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
version: "3.3"
services:
# We do not need a container for building react unless we want to
# simply use the multi-stage build in nginx
# ensure the context is correct
react-dev:
container_name: ${APPLICATION_NAME}-react
build:
context: ./app
dockerfile: Dockerfile
volumes:
- ./app:/app
ports:
- "8080:80"
environment:
- NODE_ENV=production
- CHOKIDAR_USEPOLLING=true
stdin_open: true
php-fpm:
container_name: ${APPLICATION_NAME}-php-fpm
build:
context: ./phpdocker
dockerfile: Dockerfile
ports:
- 9000:9000
#stdin_open: true
volumes:
- ./api:/api
- ./classes:/classes
nginx:
container_name: ${APPLICATION_NAME}-nginx
build:
context: .
dockerfile: ./nginx/Dockerfile
ports:
- "8090:80"
depends_on:
#- react-dev
- php-fpm
environment:
- CHOKIDAR_USEPOLLING=true
volumes:
#- ./build:/usr/share/nginx/html
#- ./api:/api
#- ./classes:/classes
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/app.conf
- ./nginx/conf.d/php.conf:/etc/nginx/conf.d/api.conf
links:
# - react-dev
- php-fpm
extra_hosts:
- "app.local:127.0.1.2"
- "api.local:127.0.1.3"
mysql:
container_name: ${APPLICATION_NAME}-mysql
build: mysql
restart: on-failure
volumes:
- .:/var/data/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
ports:
- "9092:3306"