-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (31 loc) · 888 Bytes
/
docker-compose.yml
File metadata and controls
34 lines (31 loc) · 888 Bytes
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
# copy content to docker-compose.yml file
# run `docker-compose up` to start both containers, ctrl+c to stop them
# run `docker-compose down -v` to remove containers and docker volumes
version: "3.8"
services:
postgres:
image: postgres:13-alpine
container_name: sl-postgres
environment:
POSTGRES_USER: hacker_news_stories
POSTGRES_DB: hacker_news_stories
POSTGRES_PASSWORD: hacker_news_stories
volumes:
- sl-postgres:/var/lib/postgresql/data
ports:
- 5432:5432
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
container_name: sl-elastic
volumes:
- sl-elastic:/usr/share/elasticsearch/data
environment:
- ES_JAVA_OPTS=-Xms256m -Xmx256m
- discovery.type=single-node
ports:
- 9200:9200
volumes:
sl-elastic:
driver: local
sl-postgres:
driver: local