-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
156 lines (142 loc) · 4.18 KB
/
docker-compose-dev.yml
File metadata and controls
156 lines (142 loc) · 4.18 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
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@postgres:5432/circ"
PALACE_SEARCH_URL: "http://opensearch: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_OPENSEARCH_ANALYTICS_ENABLED: true
PALACE_OPENSEARCH_ANALYTICS_URL: "http://opensearch:9200/"
PALACE_OPENSEARCH_ANALYTICS_INDEX_PREFIX: "circulation-events"
EKIRJASTO_TOKEN_SIGNING_SECRET: "234"
EKIRJASTO_TOKEN_ENCRYPTING_SECRET: "321"
ADMIN_EKIRJASTO_AUTHENTICATION_URL: "https://" # Apply actual dev url
depends_on:
pg:
condition: service_healthy
minio:
condition: service_healthy
os:
condition: service_healthy
x-cm-build: &cm-build
context: .
dockerfile: docker/Dockerfile
args:
- BASE_IMAGE=${BUILD_BASE_IMAGE-ghcr.io/natlibfi/ekirjasto-circ-baseimage:latest}
cache_from:
- ${BUILD_CACHE_FROM-ghcr.io/natlibfi/ekirjasto-circ-webapp:main}
services:
# docker compose configuration
# with permanent storage volumes for database and search index
# + pgadmin & opensearch dashboard (remove if you don't need them)
webapp:
<<: *cm
build:
<<: *cm-build
target: webapp
ports:
- "6500:80"
scripts:
container_name: scripts
<<: *cm
build:
<<: *cm-build
target: scripts
pg:
image: "postgres:16"
container_name: postgres
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
ports:
- "5432:5432"
volumes:
- "$HOME/src/circ_psql_data:/var/lib/postgresql/data"
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: root
PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION: "False"
ports:
- "5050:80"
minio:
image: "bitnamilegacy/minio:latest"
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:
container_name: opensearch
build:
dockerfile: docker/Dockerfile.ci
target: opensearch
context: .
environment:
discovery.type: "single-node"
DISABLE_SECURITY_PLUGIN: "true"
ports:
- "9200:9200"
healthcheck:
test: curl --silent http://localhost:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi
interval: 30s
timeout: 10s
retries: 5
volumes:
- $HOME/src/circ_os_data:/usr/share/opensearch/data
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:1.3.19
container_name: opensearch-dashboards
ports:
- "5601:5601"
expose:
- "5601"
environment:
cluster.routing.allocation.disk.threshold_enabled: false
OPENSEARCH_HOSTS: '["http://opensearch:9200"]'
DISABLE_SECURITY_DASHBOARDS_PLUGIN: true
data-api:
image: ghcr.io/natlibfi/ekirjasto-data-api:main
container_name: data-api
#platform: linux/x86_64
environment:
POSTGRES_URL: "postgresql://palace:test@postgres:5432/circ"
OPENSEARCH_URL: "http://opensearch:9200"
OPENSEARCH_EVENT_INDEX: "circulation-events-v1"
OPENSEARCH_WORK_INDEX: "circulation-works-v5"
ROOT_PATH: "/abu"
ports:
- "8000:80"
expose:
- "8000"
networks:
- circ-net
networks:
circ-net:
volumes:
circ-postgres-postrelease:
circ-opensearch-postrelease: