Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions dev-env/caddy/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This configuration is intended to be used with Caddy, a very small high perf proxy.
# It will serve the application containers Payara Admin GUI via HTTP instead of HTTPS,
# avoiding the trouble of self signed certificates for local development.

:4848 {
reverse_proxy https://dataverse:4848 {
transport http {
tls_insecure_skip_verify
}
header_down Location "^https://" "http://"
}
}
24 changes: 23 additions & 1 deletion dev-env/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ services:
restart: on-failure
user: payara
environment:
SKIP_DEPLOY: 1
dataverse_files_storage__driver__id: s3
DATAVERSE_DB_HOST: postgres
DATAVERSE_DB_PASSWORD: secret
Expand Down Expand Up @@ -77,7 +78,10 @@ services:
# This is necessary because the dev_nginx proxy is placed on top of the Dataverse service, making those URLs unreachable unless this port is exposed.
# This workaround is only necessary and intended for the local dev environment and will not be used in the remote environment, where we use a production DNS.
ports:
- '8080:8080'
- "8080:8080" # HTTP (Dataverse Application)
- "4949:4848" # HTTPS (Payara Admin Console)
- "9009:9009" # JDWP
- "8686:8686" # JMX
networks:
- dataverse
depends_on:
Expand All @@ -93,6 +97,24 @@ services:
mem_reservation: 1024m
privileged: false

# This proxy configuration is only intended to be used for development purposes!
# DO NOT USE IN PRODUCTION! HIGH SECURITY RISK!
dev_proxy:
image: caddy:2-alpine
# The command below is enough to enable using the admin gui, but it will not rewrite location headers to HTTP.
# To achieve rewriting from https:// to http://, we need a simple configuration file
#command: ["caddy", "reverse-proxy", "-f", ":4848", "-t", "https://dataverse:4848", "--insecure"]
command: ["caddy", "run", "-c", "/Caddyfile"]
ports:
- "4848:4848" # Will expose Payara Admin Console (HTTPS) as HTTP
restart: always
volumes:
- ./caddy/Caddyfile:/Caddyfile:ro
depends_on:
- dev_dataverse
networks:
- dataverse

dv_initializer:
container_name: 'dv_initializer'
image: gdcc/configbaker:unstable
Expand Down
2 changes: 1 addition & 1 deletion dev-env/run-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ echo "INFO - Removing current environment if exists..."
./rm-env.sh

echo "INFO - Running docker containers..."
docker compose -f "./docker-compose-dev.yml" up -d --build
SKIP_DEPLOY=1 docker compose -f "./docker-compose-dev.yml" up -d --build
Loading