-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
118 lines (108 loc) · 3.34 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: "3.9"
# Common CM setup
# see: https://github.com/compose-spec/compose-spec/blob/master/spec.md#extension
x-cm-variables: &cm
platform: "${BUILD_PLATFORM-}"
environment:
SIMPLIFIED_PRODUCTION_DATABASE: "postgresql://palace:test@pg:5432/circ"
PALACE_SEARCH_URL: "http://os:9200"
PALACE_STORAGE_ACCESS_KEY: "palace"
PALACE_STORAGE_SECRET_KEY: "test123456789"
PALACE_STORAGE_ENDPOINT_URL: "http://minio:9000"
PALACE_STORAGE_PUBLIC_ACCESS_BUCKET: "public"
PALACE_STORAGE_ANALYTICS_BUCKET: "analytics"
PALACE_STORAGE_URL_TEMPLATE: "http://localhost:9000/{bucket}/{key}"
PALACE_REPORTING_NAME: "TEST CM"
PALACE_SECRET_KEY: "SECRET_KEY_USED_FOR_ADMIN_UI_COOKIES"
PALACE_PATRON_WEB_HOSTNAMES: "*"
PALACE_BASE_URL: "http://localhost:6500"
PALACE_CELERY_BROKER_URL: "redis://redis:6379/0"
PALACE_CELERY_BROKER_TRANSPORT_OPTIONS_GLOBAL_KEYPREFIX: "test"
PALACE_CELERY_CLOUDWATCH_STATISTICS_DRYRUN: "true"
PALACE_REDIS_URL: "redis://redis:6379/1"
# Set up the environment variables used for testing as well
PALACE_TEST_DATABASE_URL: "postgresql://palace:test@pg:5432/circ"
PALACE_TEST_SEARCH_URL: "http://os:9200"
PALACE_TEST_MINIO_URL: "http://minio:9000"
PALACE_TEST_MINIO_USER: "palace"
PALACE_TEST_MINIO_PASSWORD: "test123456789"
PALACE_TEST_REDIS_URL: "redis://redis:6379/2"
depends_on:
pg:
condition: service_healthy
minio:
condition: service_healthy
os:
condition: service_healthy
redis:
condition: service_healthy
x-cm-build: &cm-build
context: .
dockerfile: docker/Dockerfile
args:
- BASE_IMAGE=${BUILD_BASE_IMAGE-ghcr.io/thepalaceproject/circ-baseimage:latest}
cache_from:
- ${BUILD_CACHE_FROM-ghcr.io/thepalaceproject/circ-webapp:main}
services:
# example docker compose configuration for testing and development
webapp:
<<: *cm
build:
<<: *cm-build
target: webapp
ports:
- "6500:80"
scripts:
<<: *cm
build:
<<: *cm-build
target: scripts
pg:
image: "postgres:16"
environment:
POSTGRES_USER: palace
POSTGRES_PASSWORD: test
POSTGRES_DB: circ
healthcheck:
test: ["CMD-SHELL", "pg_isready -U palace -d circ"]
interval: 30s
timeout: 30s
retries: 3
minio:
image: "bitnami/minio:2023.2.27"
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: "palace"
MINIO_ROOT_PASSWORD: "test123456789"
MINIO_SCHEME: "http"
MINIO_DEFAULT_BUCKETS: "public:download,analytics"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
os:
build:
dockerfile: docker/Dockerfile.ci
target: opensearch
context: .
environment:
discovery.type: "single-node"
DISABLE_SECURITY_PLUGIN: "true"
bootstrap.memory_lock: "true"
OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m"
DISABLE_INSTALL_DEMO_CONFIG: "true"
healthcheck:
test: curl --silent http://localhost:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi
interval: 30s
timeout: 10s
retries: 5
redis:
image: "redis/redis-stack-server:7.4.0-v0"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 20s
retries: 3