-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
142 lines (130 loc) · 3.96 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
version: "3"
services:
app:
image: adnnor/nginx:1.18
volumes: &appvolumes
- ~/.composer:/var/www/.composer:cached
- ~/.ssh:/var/www/.ssh:cached
- ~/.ssh/known_hosts:/var/www/.ssh/known_hosts:cached
- ./src:/var/www/html:cached
- ./conf/nginx.default.conf:/etc/nginx/conf.d/default.conf:cached
- ./conf/.env-app.local:/var/www/html/.env-app.local:cached
- sockdata:/sock
- ssldata:/etc/nginx/certs
networks:
- oro
labels:
- "traefik.enable=true"
- "traefik.http.routers.project1.rule=Host(`project1.local`)"
- "traefik.http.services.project1.loadbalancer.server.port=8000"
phpfpm:
image: adnnor/php:8.3-fpm
volumes: *appvolumes
networks:
- oro
env_file: env/phpfpm.env
traefik:
image: traefik:v2.5
ports:
- "80:80"
- "443:443"
- "8080:8080"
- "8082:8082"
networks:
- oro
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./traefik.yml:/etc/traefik/traefik.yml"
- "./acme.json:/acme.json"
labels:
- "traefik.enable=true"
# Web traffic routing for project1
#- "traefik.http.routers.traefik-project1.rule=Host(`traefik.project1.local`)"
- "traefik.http.services.traefik-project1.loadbalancer.server.port=8000"
# Dashboard access
- "traefik.http.routers.traefik-dashboard.rule=Host(`traefik.project1.local`)"
- "traefik.http.routers.traefik-dashboard.service=api@internal"
- "traefik.http.services.traefik-dashboard.loadbalancer.server.port=8080"
# supervisor:
# image: adnnor/supervisor
# volumes:
# - ./src:/var/www/html
# - ./conf/supervisord.conf:/etc/supervisord.conf
# depends_on:
# - phpfpm
# networks:
# - oro
# restart: always
# command: /bin/sh -c "rm -f /tmp/supervisor.sock && supervisord -n"
postgres:
image: postgres:latest
command:
- "--max_connections=200"
- "--shared_buffers=256MB"
env_file: env/postgres.env
networks:
- oro
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.postgres-project1.rule=HostSNI(`postgres.project1.local`)"
- "traefik.tcp.services.postgres-project1.loadbalancer.server.port=5432"
volumes:
- postgres-data:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4
depends_on:
- postgres
env_file: env/pgadmin.env
networks:
- oro
labels:
- "traefik.enable=true"
- "traefik.http.routers.pgadmin-project1.rule=Host(`pgadmin.project1.local`)"
- "traefik.http.services.pgadmin-project1.loadbalancer.server.port=80"
volumes:
- pgadmin-data:/var/lib/pgadmin
restart: always
elasticsearch:
image: adnnor/elasticsearch:8.4
labels:
- "traefik.enable=true"
- "traefik.http.routers.elasticsearch.rule=Host(`elasticsearch.project1.local`)"
- "traefik.http.services.elasticsearch.loadbalancer.server.port=9200"
env_file: env/elasticsearch.env
environment:
- "discovery.type=single-node"
## Avoid test failures due to small disks
## More info at https://github.com/markshust/docker-magento/issues/488
- "cluster.routing.allocation.disk.threshold_enabled=false"
- "index.blocks.read_only_allow_delete"
## Uncomment to set custom heap size to avoid memory errors
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
## Uncomment to increase the virtual memory map count
- "max_map_count=262144"
# redis:
# image: redis:6.0-alpine
# ports:
# - "6379:6379"
# rabbitmq:
# image: rabbitmq:3.11-management-alpine
# ports:
# - "15672:15672"
# - "5672:5672"
# volumes:
# - rabbitmqdata:/var/lib/rabbitmq
# env_file: env/rabbitmq.env
# mailcatcher:
# image: sj26/mailcatcher
# ports:
# - "1080:1080"
networks:
oro:
driver: bridge
volumes:
appdata:
dbdata:
rabbitmqdata:
pgadmin-data:
sockdata:
ssldata:
postgres-data: