-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (77 loc) · 1.84 KB
/
Copy pathdocker-compose.yml
File metadata and controls
82 lines (77 loc) · 1.84 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '3'
services:
database:
build:
context: docker/database
networks:
- general
environment:
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${DATABASE_USER}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DATABASE_ROOT_PASSWORD}
ports:
- "${DATABASE_PORT}:3306"
volumes:
- ./docker/database/data:/var/lib/mysql
php-fpm:
build:
context: docker/php-fpm
links:
- database
- elasticsearch
depends_on:
- database
- elasticsearch
networks:
- general
environment:
- APP_ENV=${APP_ENV}
- APP_SECRET=${APP_SECRET}
- DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:3306/${DATABASE_NAME}
volumes:
- ./:/var/www
# - ~/Development/develcoders/mylib-api:/var/www/symfony:cached
nginx:
build:
context: docker/nginx
volumes:
- ./:/var/www
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/sites/:/etc/nginx/sites-available
- ./docker/nginx/conf.d/:/etc/nginx/conf.d
- ./docker/logs:/var/log
depends_on:
- php-fpm
networks:
- general
ports:
- "${NGINX_HTTP_PORT}:80"
- "${NGINX_HTTPS_PORT}:443"
elasticsearch:
container_name: ${ELASTICSEARCH_HOST}
build:
context: docker/elasticsearch
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- cluster.name=es01-mylib
- node.name=es01
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
networks:
- general
volumes:
- ./docker/elasticsearch/data:/usr/share/elasticsearch/data
ports:
- ${ELASTICSEARCH_PORT}:9200
networks:
general:
driver: bridge