-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
109 lines (103 loc) · 2.62 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
version: '3'
services:
# PHP -----------------------------------------------
php:
build:
context: images/php
dockerfile: Dockerfile
args:
- UID=${UID}
- BACK_DIR=${PHP_WORKDIR}
container_name: ${PHP_WORKDIR}
environment:
PHP_IDE_CONFIG: "serverName=Docker"
restart: always
working_dir: /var/www/${PHP_WORKDIR}
volumes:
- .:/var/www/${PHP_WORKDIR}
depends_on:
- database
logging:
driver: json-file
options:
max-size: "200m"
max-file: "3"
# Nginx -----------------------------------------------
nginx:
build:
context: images/nginx
dockerfile: Dockerfile
args:
- DOMAIN=${DOMAIN}
- ENV=${APP_ENV}
- BACK_DIR=${PHP_WORKDIR}
container_name: ${NGINX_WORKDIR}
restart: always
ports:
- "${PORT_HTTP}:80"
- "${PORT_HTTPS}:443"
working_dir: /var/www/${NGINX_WORKDIR}
volumes:
- .:/var/www/${NGINX_WORKDIR}
- .:/var/www/${PHP_WORKDIR}
- ../var/www/monitoring/nginx-logs:/var/log/nginx/
depends_on:
- php
logging:
driver: json-file
options:
max-size: "200m"
max-file: "3"
# Redis -------------------------------------------------
redis:
image: redis:6-alpine
container_name: ${REDIS_WORKDIR}
restart: always
volumes:
- ./images/redis/redis.conf:/redis.conf
depends_on:
- php
- database
command: [ "redis-server", "/redis.conf" ]
logging:
driver: json-file
options:
max-size: "200m"
max-file: "3"
# Database -------------------------------------------------
database:
build:
context: images/postgres
dockerfile: Dockerfile
container_name: ${DATABASE_WORKDIR}
restart: always
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
volumes:
- ./postgres-data:/var/lib/postgresql/data
ports:
- '5432:5432'
logging:
driver: json-file
options:
max-size: "200m"
max-file: "3"
# meilisearch -------------------------------------------------
meilisearch:
image: getmeili/meilisearch:latest
container_name: ${MEILISEARCH}
restart: always
volumes:
- ./data.ms:/data.ms
environment:
- MEILI_NO_ANALYTICS=true
- MEILI_NO_SENTRY=true
- MEILI_MASTER_KEY=${MEILISEARCH_KEY}
ports:
- "7700:7700"
logging:
driver: json-file
options:
max-size: "200m"
max-file: "3"