-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (48 loc) · 1.43 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
services:
postgres:
image: postgres:14
container_name: postgres_container
environment:
POSTGRES_USER: taskuser
POSTGRES_PASSWORD: taskpass
POSTGRES_DB: market
volumes:
- postgres_data:/var/lib/postgresql/data
- ./1-schema.sql:/docker-entrypoint-initdb.d/1-schema.sql
- ./2-data.sql:/docker-entrypoint-initdb.d/2-data.sql
ports:
- "5433:5432"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.3
container_name: elasticsearch_container
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- xpack.security.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
spring_app:
build:
context: .
dockerfile: Dockerfile
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/market
SPRING_DATASOURCE_USERNAME: taskuser
SPRING_DATASOURCE_PASSWORD: taskpass
ELASTICSEARCH_URL: http://elasticsearch:9200
container_name: spring_app_container
depends_on:
- postgres
- elasticsearch
ports:
- "8080:8080"
volumes:
postgres_data:
es_data: