Skip to content

Instantly share code, notes, and snippets.

@IntegrityKnight
Last active November 14, 2018 09:04
Show Gist options
  • Save IntegrityKnight/edc33f17c9cf7aeebaee794995eed341 to your computer and use it in GitHub Desktop.
Save IntegrityKnight/edc33f17c9cf7aeebaee794995eed341 to your computer and use it in GitHub Desktop.
docker-compose example for TomEE Plus + JNDI + Derby
# Please check "https://javatoybox.blogspot.com/2018/10/docker-network-docker-compose.html"
DERBY_IMAGE_TAG=v10.14.2.0
TOMEE_IMAGE_TAG=v8-jre-7.1.0-plus
# for Windows "A:\\javatoybox\\Database\\"
# for Linux "~/Database"
# for k8s ( Windows 10 ) "//a/javatoybox/Database/"
DERBY_MOUNT_MAPPING=A:\\javatoybox\\Database\\
# test website "http://localhost:8080/TomEE-JNDI-Derby-Example/datasource.jsp"
version: "3.7"
services:
db:
hostname: db
image: integrityknight/derby:${DERBY_IMAGE_TAG}
container_name: derby_db
ports:
- 1527:1527
healthcheck:
disable: true
volumes:
- ${DERBY_MOUNT_MAPPING}:/Database
command: java -Dderby.stream.error.field=java.lang.System.out org.apache.derby.drda.NetworkServerControl start -h db
tomee:
hostname: tomee
depends_on:
- db
image: integrityknight/tomee:${TOMEE_IMAGE_TAG}
container_name: tomee_plus
ports:
- 8080:8080
volumes:
- ./webapps/:/usr/local/tomee/webapps
- ./lib/:/usr/local/tomee/lib
- ./conf/:/usr/local/tomee/conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment