This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.dev.yml
107 lines (99 loc) · 2.27 KB
/
docker-compose.dev.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
version: "3.7"
# settings
x-db-env:
&dbenv
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: labonneboite
MYSQL_USER: labonneboite
MYSQL_PASSWORD: labonneboite
x-common-env:
# database
&cenv
DB_NAME: labonneboite
DB_USER: labonneboite
DB_PASSWORD: labonneboite
DB_HOST: mysql
DB_PORT: 3306
# elastic search
ES_HOST: elasticsearch:9200
# other
OFFICE_TABLE: etablissements
LBB_ENV: development
services:
labonneboite-es-index:
build:
context: .
dockerfile: docker/v3.10/Dockerfile
environment:
<<: *cenv
entrypoint: /bin/bash /entrypoints/index.sh
depends_on:
labonneboite:
condition: service_healthy
labonneboite:
hostname: labonneboite-backend
restart: always
build:
context: .
dockerfile: docker/v3.10/Dockerfile
args:
options: --reload
environment:
<<: *cenv
volumes:
- ./labonneboite/alembic/sql/dev:/sql
- ./labonneboite:/app/labonneboite
- ./debug/logs:/app/logs
healthcheck:
test: curl localhost:8080 || exit 1
interval: 10s
retries: 5
timeout: 2s
depends_on:
elasticsearch:
condition: service_healthy
mysql:
condition: service_healthy
ports:
- 8080:8080
# ###### 3rd-party services
# # https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
# # https://www.elastic.co/blog/how-to-make-a-dockerfile-for-elasticsearch
elasticsearch:
hostname: elasticsearch
image: elasticsearch:1.7.2
environment:
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
- "cluster.name=lbbv1"
- "bootstrap.memory_lock=true"
ulimits:
nofile:
soft: 65536
hard: 65536
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
- 9300:9300
healthcheck:
test: curl --fail localhost:9200/_cat/health || exit 1
interval: 10s
retries: 5
timeout: 2s
# database
mysql:
image: mariadb:10.5.9-focal
environment:
<<: *dbenv
ports:
- 3306:3306
volumes:
- db:/var/lib/mysql
healthcheck:
test: "/usr/bin/mysql --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
volumes:
db: