-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (62 loc) · 1.97 KB
/
docker-compose.yml
File metadata and controls
66 lines (62 loc) · 1.97 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
# Docker Compose for Facet Product Catalog Example
# Run from the product-catalog directory with: docker-compose up
services:
mongodb:
image: mongo:8.0
container_name: facet-product-catalog-mongo
#ports:
# - "27017:27017"
volumes:
- mongo-data:/data/db
# Mount product catalog init script to populate sample data
- ./init-data.js:/docker-entrypoint-initdb.d/init-data.js:ro
networks:
- facet-network
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 5s
retries: 5
facet:
build:
context: ../..
dockerfile: examples/product-catalog/Dockerfile
image: facet-product-catalog:latest
pull_policy: build
container_name: facet-product-catalog
depends_on:
mongodb:
condition: service_healthy
ports:
- "8080:8080" # RESTHeart API HTTP port
environment:
RHO: >
/mclient/connection-string->"mongodb://mongodb";
/pebble-template-processor/enabled->true;
/http-listener/host->"0.0.0.0";
volumes:
# Mount product catalog configuration
- ./restheart.yml:/opt/restheart/etc/restheart.yml:ro
# Mount users file for authentication
- ./users.yml:/opt/restheart/etc/users.yml:ro
# Mount product catalog templates (hot-reload enabled)
- ./templates:/opt/restheart/templates:ro
# Mount product catalog static assets (CSS, images, etc.)
- ./static:/opt/restheart/static:ro
# Mount JavaScript plugins (hot-reload supported on GraalVM)
- ./plugins/product-stats:/opt/restheart/plugins/product-stats:ro
networks:
- facet-network
healthcheck:
test: curl -f http://localhost:8080/ping || exit 1
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
mongo-data:
name: facet-product-catalog-mongo-data
networks:
facet-network:
name: facet-product-catalog-network
driver: bridge