This repository has been archived by the owner on Aug 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
79 lines (73 loc) · 1.63 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
version: '3.9'
volumes:
sagasu_es: {}
sagasu_redis: {}
sagasu_postgres: {}
networks:
sagasu_net: {}
services:
redis:
image: redis:alpine
container_name: sagasu_redis
healthcheck:
test: ['CMD-SHELL', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
networks:
- sagasu_net
volumes:
- sagasu_redis:/data
expose: [6379]
postgres:
image: postgres:alpine
container_name: sagasu_postgres
volumes:
- sagasu_postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 10s
timeout: 5s
retries: 5
networks:
- sagasu_net
environment:
POSTGRES_PASSWORD: password
expose: [5432]
elasticsearch:
container_name: sagasu_es
build:
dockerfile: ./docker/elasticsearch.dockerfile
context: .
volumes:
- sagasu_es:/usr/share/elasticsearch/data
networks:
- sagasu_net
env_file:
- ./docker/elasticsearch.env
environment:
discovery.type: single-node
expose: [9200]
core:
container_name: sagasu_core
build:
dockerfile: ./docker/core.dockerfile
context: .
restart: on-failure
networks:
- sagasu_net
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
elasticsearch:
condition: service_healthy
ports:
- '127.0.0.1:3000:3000'
env_file:
- ./.env
environment:
DATABASE_URL: postgres://postgres:password@postgres:5432/postgres
REDIS_URL: redis://redis:6379
ES_NODE: http://elasticsearch:9200