-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
144 lines (133 loc) · 3.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
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
143
144
services:
postgres:
image: postgres:14
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
env_file:
- .env
environment:
POSTGRES_PASSWORD: postgrespassword
hasura:
build:
context: targets/hasura
extra_hosts:
host.docker.internal: host-gateway
volumes:
- ./targets/hasura/migrations:/hasura-migrations
- ./targets/hasura/metadata:/hasura-metadata
ports:
- "8080:8080"
depends_on:
- postgres
env_file:
- .env
environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_MIGRATIONS_DIR: /hasura-migrations
HASURA_GRAPHQL_METADATA_DIR: /hasura-metadata
ingester:
build:
context: .
dockerfile: targets/ingester/Dockerfile
shm_size: 512m
depends_on:
- hasura
env_file:
- .env
environment:
HASURA_GRAPHQL_ENDPOINT: "http://hasura:8080/v1/graphql"
minio:
image: minio/minio
ports:
- "9000:9000"
- "8900:8900"
environment:
MINIO_ROOT_USER: MINIO_ACCESS_KEY
MINIO_ROOT_PASSWORD: MINIO_SECRET_KEY
volumes:
- minio_data:/data
command: 'minio server /data/minio --console-address ":8900"'
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc alias set myminio http://minio:9000 MINIO_ACCESS_KEY MINIO_SECRET_KEY;
/usr/bin/mc mb myminio/cdtn;
/usr/bin/mc anonymous set public myminio/cdtn;
exit 0;
"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.4
volumes:
- elastic_data:/usr/share/elasticsearch/data
environment:
- ES_JAVA_OPTS=-Xmx4g
- cluster.name=code-du-travail-data-elasticsearch
- node.name=code-du-travail-data-elasticsearch-single-node
- network.host=0.0.0.0
- discovery.type=single-node
- http.cors.enabled=true
- http.cors.allow-origin='*'
- xpack.security.enabled=false
- xpack.ml.enabled=false
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:8.13.4
ports:
- 5601:5601
depends_on:
- elasticsearch
www:
build:
context: .
dockerfile: targets/frontend/Dockerfile
secrets:
- npmTiptapToken
depends_on:
- hasura
ports:
- "3001:3000"
environment:
HASURA_GRAPHQL_ENDPOINT: "http://hasura:8080/v1/graphql"
NEXTAUTH_SECRET: "6ZYMHbt0mxOj9y6mTyG2nJVt2zWDEdckLJz248uflwI="
NEXTAUTH_URL: "http://localhost:3001"
export:
platform: linux/amd64
build:
context: .
dockerfile: targets/export-elasticsearch/Dockerfile
shm_size: 512m
ports:
- 8787:8787
environment:
HASURA_GRAPHQL_ENDPOINT: "http://hasura:8080/v1/graphql"
DISABLE_COPY: "true"
DISABLE_SITEMAP: "true"
DISABLE_LIMIT_EXPORT: "true"
DISABLE_AGREEMENTS: "true"
ELASTICSEARCH_INDEX_PREPROD: "cdtn-preprod-v1"
ELASTICSEARCH_INDEX_PROD: "cdtn-v1"
ELASTICSEARCH_URL_PREPROD: "http://elasticsearch:9200"
ELASTICSEARCH_URL_PROD: "http://elasticsearch:9200"
alert-cli:
build:
context: .
dockerfile: targets/alert-cli/Dockerfile
volumes:
db_data:
elastic_data:
minio_data:
secrets:
npmTiptapToken:
file: .npmTiptapToken.secret