Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33
Dockerized instance of OpenBoxes
License
openboxes/openboxes-docker
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This project contains the relevant files to run OpenBoxes using Docker. It utilizes docker-compose, which enables connecting several independentdockerized services together (in this case MySQL and Grails), and maintaining configuration for these within a docker-compose.yml file.
If you haven't already done do, you will need toInstall Docker andInstall Docker Compose
git clone https://github.com/openboxes/openboxes.git ## switch to whatever version you're usinggit clone https://github.com/openboxes/openboxes-docker.gitAlthough this docker-compose project should work without modification, there may be occasions when you would like more control over theway it operates, given your particular machine configuration. Most of the included files should be considered defaults that can be changed. Some common examples:
The location of openboxes code - This is assumed to be locally cloned as "openboxes" in a directory at the same level as this docker project.You can see this in the docker-compose file, which attempts to mount a volume from "../openboxes" on your host into the grails-java-7 container at "/app", which iswhere the container assumes that the Grails project is located.
The Tomcat port - Default is 8080. Changing this requires editing the "grails" service settings in docker-compose.ymland the grails.serverUrl in openboxes-config.properties
The Tomcat memory and environment - Edit the included openboxes-setenv.sh file
The MySQL database name, port, username, or password - Changing these requires editing the "db" service settings in docker-compose.ymland the dataSource.url, dataSource.username, and/or dataSource.password in openboxes-config.properties
The MySQL root password - Edit the "db" service settings in docker-compose.yml
The MySQL configuration - Edit the included openboxes-mysql.conf file
From the base directory (the one that contains your docker-compose.yml file) run:
docker-compose up --build
This will build the grails-java-7 image that is included and referenced as a relative image within the docker-compose.yml file. It will then try tofire up the application the first time.
NOTE: This will likely fail the first time when Grails attempts to run. We generally see the following error on first run:
groovy.lang.MissingPropertyException: No such property: mergedConfig for class: org.codehaus.groovy.grails.commons.DefaultGrailsApplicationAfter step 1 above, Ctrl-C out of it, and attempt to run again, this time omitting the build flag:
docker-compose up
This should successfully start up the application. If any errors occur, these will generally be configuration related. Fix and repeat this step
Ctrl-C from the window in which you brought the containers up is sufficient to later stop those services. You can also stop them explicitly from anotherterminal window, by running:
docker-compose down
Some useful commands that are helpful to work with these containers while they are running:
Open up a bash shell for working within a container
docker exec -it <container-name> /bin/bash
For example, let's say you want to use the mysql client within the mysql container to look around the database a bit:
docker ps- will show you the names of which containers are running. Typically mysql will be inopenboxesdocker_db_1 if build like described abovedocker exec -it openboxesdocker_db_1 /bin/bash- this will put you into a bash shellinside the container. It will look something likeroot@d7e7bd809849:/#mysql -u openboxes -p openboxes- Now that you are inside the container, you can run the normal slew of mysql commands as if it is local
Open up a bash shell for working within a container with docker-compose:
docker-compose exec <service-name> bash
This will put you in a bash shellinside the container with the service name defined in the docker-compose.yml file, in this casedb orgrails.
Tail the log file of a particular container
docker logs -f <container-name> (seehttps://docs.docker.com/engine/reference/commandline/logs/)
For example, let's say you want to tail the Tomcat/Grails logs":
docker ps- will show you the names of which containers are running. Typically grails will be inopenboxesdocker_grails_1 if build like described abovedocker logs -f openboxesdocker_grails_1- will tail the log file. Hit Ctrl-C to exit.
About
Dockerized instance of OpenBoxes
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Contributors7
Uh oh!
There was an error while loading.Please reload this page.