-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
71 lines (66 loc) · 1.85 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
version: '3'
services:
frontend:
image: marvinroesch/book-search-frontend
container_name: bs-frontend
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "4080:80"
backend:
image: marvinroesch/book-search-backend
container_name: bs-api
build:
context: ./backend
dockerfile: Dockerfile
environment:
- ELASTIC_HOST=http://elasticsearch:9200
- DEFAULT_PASSWORD=booksearcher
- CRYPTO_KEY=966efc7f2526829ec7580bfb033652555adcc2bd8fb2a250aaa0ced12bbff00b7b60dd0e323f129171a27d66660af93b258eab90507ff28895fb79b459ced1f2
- DB_CONNECTION=jdbc:postgresql://db/booksearch
- DB_DRIVER=org.postgresql.Driver
- DB_USERNAME=booksearch
- DB_PASSWORD=b00kse4rch
- DB_MIGRATION_USERNAME=booksearch_migrations
- DB_MIGRATION_PASSWORD=migr4tion5
depends_on:
elasticsearch:
condition: service_healthy
db:
condition: service_healthy
elasticsearch:
image: marvinroesch/book-search-elasticsearch
container_name: bs-search
build:
context: ./
dockerfile: Dockerfile-elasticsearch
volumes:
- esdata:/usr/share/elasticsearch/data
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
ports:
- "9300:9300"
- "9200:9200"
db:
image: postgres:12
container_name: bs-db
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 3
environment:
- POSTGRES_PASSWORD=example
- DB_MIGRATION_USER=booksearch_migrations
- DB_MIGRATION_PASSWORD=migr4tion5
- DB_DATA_USER=booksearch
- DB_DATA_PASSWORD=b00kse4rch
ports:
- "5432:5432"
volumes:
- ./deploy/database-init:/docker-entrypoint-initdb.d
volumes:
esdata: