forked from augustina-jpg/scoopdope
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (87 loc) · 1.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
94 lines (87 loc) · 1.92 KB
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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: scoopdope
POSTGRES_USER: scoopdope
POSTGRES_PASSWORD: scoopdope
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- '5432:5432'
networks:
- scoopdope
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis_data:/data
ports:
- '6379:6379'
networks:
- scoopdope
elasticsearch:
image: elasticsearch:8.12.0
restart: unless-stopped
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms512m -Xmx512m
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
ports:
- '9200:9200'
networks:
- scoopdope
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9200']
interval: 30s
timeout: 10s
retries: 5
backend:
build:
context: .
dockerfile: apps/backend/Dockerfile
restart: unless-stopped
ports:
- '3000:3000'
env_file:
- .env
environment:
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_USERNAME: scoopdope
DATABASE_PASSWORD: scoopdope
DATABASE_NAME: scoopdope
REDIS_HOST: redis
REDIS_PORT: 6379
ELASTICSEARCH_NODE: http://elasticsearch:9200
volumes:
- /app/node_modules # Prevent host node_modules override
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
elasticsearch:
condition: service_healthy
networks:
- scoopdope
logging:
driver: 'json-file'
options:
max-size: '100m'
max-file: '5'
volumes:
postgres_data:
driver: local
redis_data:
driver: local
elasticsearch_data:
driver: local
networks:
scoopdope:
name: scoopdope
driver: bridge