# Cerberus Copyright (C) 2016 Cerberus Testing # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This file is part of Cerberus. # # Cerberus is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Cerberus is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Cerberus. If not, see . # Cerberus Glassfish MySQL composition. # Run a Cerberus instance with a Glassfish application server and a MySQL database. # # How to run: # - $ wget https://raw.githubusercontent.com/cerberustesting/cerberus-source/master/docker/compositions/cerberus-glassfish-mysql/default.yml # - modify default.yml according to your local config. # - $ docker-compose up -f default.yml # - Waiting for images startup # - Open your favorite browser and go to :18080/Cerberus, where is your Docker host # # Exposed ports: # - 13306: MySQL database access # - 18080: Glassfish HTTP access # - 14848: Glassfsh administration console access # # Volumes: # - MySQL data directory : FROM /var/lib/mysql TO ../localdata/mysql-db (SERVICE cerberus-db-mysql) # - Cerberus Media directory : FROM /opt/CerberusMedias TO ../localdata/cerberusmedias (SERVICE cerberus-as-glassfish) # - Cerberus server directory : FROM /glassfish5/glassfish/domains/cerberus TO ../localdata/server (SERVICE cerberus-as-glassfish) # ** IMPORTANT ** # The default mapping values are for test only. Don't forget to change them to be more relevant with your configuration. version: '2' services: cerberus-db-mysql: image: cerberustesting/cerberus-db-mysql:latest expose: - "3306" ports: - "13306:3306" volumes: - ./localdata/mysql-db:/var/lib/mysql # - /etc/localtime:/etc/localtime:ro restart: always cerberus-as-glassfish: image: cerberustesting/cerberus-as-glassfish:latest environment: - DATABASE_HOST=cerberus-db-mysql - DATABASE_PORT=3306 - GLASSFISH_DOMAIN=cerberus # If you want custom glasfish admin password. It's recommanded for a production instance # - GLASSFISH_ADMIN_PASSWORD=custompassword ports: - "18080:8080" - "14848:4848" volumes: - ./localdata/server:/glassfish5/glassfish/domains/cerberus # allow to persist database pool connection / custom glassfish settings # - ./localdata/lib:/tmp/lib/ # allow to add jdbc library to connect database to cerberus. Uncomment only if folder not empty. - ./localdata/cerberusmedia:/opt/CerberusMedias/ # - /etc/localtime:/etc/localtime:ro restart: always depends_on: - cerberus-db-mysql links: - cerberus-db-mysql