-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml.dev
More file actions
103 lines (98 loc) · 3.88 KB
/
docker-compose.yml.dev
File metadata and controls
103 lines (98 loc) · 3.88 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
# Author: Eryk Kulikowski @ KU Leuven (2024). Apache 2.0 License
services:
dataverse:
build:
dockerfile: ./dataverse/Dockerfile.dev
args:
- BASE_VERSION=${BASE_VERSION:-6.9-noble}
- USER_ID=${USER_ID:-1000}
- GROUP_ID=${GROUP_ID:-1000}
environment:
ENABLE_JDWP: "1"
ENABLE_RELOAD: "1"
SKIP_DEPLOY: "${SKIP_DEPLOY}"
MP_CONFIG_PROFILE: dev
DATAVERSE_JSF_PROJECT_STAGE: Development
DATAVERSE_JSF_REFRESH_PERIOD: "0"
volumes:
- ./docker-volumes/dataverse/data:/dv
- ./docker-volumes/dataverse/conf:/conf
- ./docker-volumes/dataverse/secrets:/run/secrets
- ./dataverse/init_dv.sh:/opt/payara/scripts/init.d/init_dv.sh
- ./dataverse/setup.sh:/scripts/setup.sh
- ./dataverse/setup-tools:/scripts/setup-tools
- ./dataverse/update-fields.sh:/scripts/update-fields.sh
- ./docker-volumes/solr:/solr
- ./docker-volumes/dataverse/applications:/opt/payara/appserver/glassfish/domains/domain1/applications
integration:
build:
dockerfile: ./image/Dockerfile.dev
entrypoint: /usr/local/bin/dev-entrypoint.sh 100 oidc --config /oauth2-proxy.cfg
environment:
DEV: "true"
FRONTEND_DEV_DIR: /workspace/rdm-integration-frontend
FRONTEND_DEV_PORT: "4200"
FRONTEND_DEV_URL: http://localhost:4200
ports:
- "7788:7788"
volumes:
- ./docker-volumes/integration/data:/dsdata
- ./docker-volumes/integration/conf:/config
- ./docker-volumes/dataverse/secrets:/run/secrets:ro
- ./docker-volumes/integration/conf/oauth2-proxy.cfg:/oauth2-proxy.cfg
- ./image:/workspace/backend
- ../rdm-integration-frontend:/workspace/rdm-integration-frontend
- ./docker-volumes/integration/go-mod-cache:/home/app/go/pkg/mod
- ./docker-volumes/integration/go-build-cache:/home/app/.cache/go-build
# Vite dev server for the IQSS dataverse-frontend SPA. Mounts the
# sibling ../dataverse-frontend checkout so saving a source file
# triggers an HMR push to the browser through modern_proxy. The
# dev-env vite.config.ts is mounted on top of the project's own
# vite.config.ts because it sets `base: '/modern'`, listens on
# 0.0.0.0:5173, and configures `server.hmr.clientPort: 8000` — the
# combination that makes HMR work behind the nginx reverse proxy.
modern_frontend:
container_name: "modern_frontend"
hostname: modern_frontend
build:
context: ../dataverse-frontend
dockerfile: ./dev.Dockerfile
network: host
expose:
- "5173"
stdin_open: true
networks:
- dataverse
volumes:
- ../dataverse-frontend:/usr/src/app
- ../dataverse-frontend/dev-env/vite.config.ts:/usr/src/app/vite.config.ts
# Override the SPA's runtime config so OIDC endpoints point at
# keycloak.localhost:8090 (the canonical issuer for this stack).
- ./dev/modern-config.js:/usr/src/app/public/config.js:ro
# Mask the host's dev-env subdir so the container only sees the
# project's own vite config injected above.
- /usr/src/app/dev-env
# Use the container-built node_modules instead of whatever is on
# the host (which may be empty or out of sync).
- /usr/src/app/node_modules
# Reverse proxy that gives the SPA a same-origin entrypoint with
# Dataverse's API. Routes /modern -> modern_frontend (Vite) with
# WebSocket upgrade for HMR; everything else -> dataverse:8080.
# Same-origin design eliminates browser CORS for /api calls; MinIO
# uploads remain cross-origin but MinIO ships permissive CORS by
# default so no explicit allowlist is needed.
modern_proxy:
container_name: "modern_proxy"
image: nginx:stable
ports:
- "8000:80"
networks:
- dataverse
depends_on:
- dataverse
- modern_frontend
volumes:
- ./dev/modern-nginx.conf:/etc/nginx/nginx.conf:ro
volumes:
go-mod-cache:
go-build-cache: