-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
106 lines (100 loc) · 2.31 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
services:
mysql.dev:
container_name: mysql.dev
build:
context: .
dockerfile: ${DOCKER_FILE_FOLDER}/mysql/Dockerfile
ports:
- ${MYSQL_PORT}:3306
restart: always
volumes:
- mysql.dev.data:/var/lib/mysql
- ${LOG_FOLDER}:/var/log/mysql
working_dir: /var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
SERVICE_TAGS: ${MYSQL_SERVICE_TAGS}
SERVICE_NAME: ${MYSQL_SERVICE_NAME}
networks:
- app
mongo.dev:
container_name: mongo.dev
build:
context: .
dockerfile: ${DOCKER_FILE_FOLDER}/mongo/Dockerfile
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
ports:
- ${MONGO_PORT}:27017
volumes:
- mongo.dev.data:/data/db
working_dir: /data/db
networks:
- app
redis.dev:
container_name: redis.dev
build:
context: .
dockerfile: ${DOCKER_FILE_FOLDER}/redis/Dockerfile
ports:
- ${REDIS_PORT}:6379
restart: always
volumes:
- redis.dev.data:/data
working_dir: /data
command: redis-server --save 20 1 --loglevel debug --requirepass ${REDIS_PASSWORD}
networks:
- app
php.dev:
container_name: php.dev
build:
context: .
dockerfile: ${DOCKER_FILE_FOLDER}/php/Dockerfile
args:
APP_ENV: ${APP_ENV}
USER: ${USER_NAME}
GROUP: ${GROUP_NAME}
APP_FOLDER: ${APP_FOLDER}
expose:
- '9000'
- '9003'
restart: always
user: ${USER_NAME}
volumes:
- ./src:/app
working_dir: /app
depends_on:
- mysql.dev
networks:
- app
nginx.dev:
container_name: nginx.dev
build:
context: .
dockerfile: ${DOCKER_FILE_FOLDER}/nginx/Dockerfile
args:
USER: ${USER_NAME}
GROUP: ${GROUP_NAME}
ports:
- ${NGINX_PORT}:80
restart: always
user: ${USER_NAME}
volumes:
- ./src:/app
- ${LOG_FOLDER}:/var/log/nginx/
working_dir: /app
depends_on:
- php.dev
networks:
- app
networks:
app:
volumes:
mysql.dev.data:
redis.dev.data:
mongo.dev.data: