Skip to content

seam-project/unitime-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unitime-docker

Helps build and configure development Docker images and containers for unitime.

Pre-requisites

  • Docker and docker-compose
  • Unitime source code repository
  • An environment that can run bash scripts (on Windows this could be Git Bash, cygwin, WSL, etc.)

The wrapper script

This project provides a script that acts as a wrapper for commands that help in building and managing development Docker images and containers for unitime. The script can be executed from an environment that can run bash script using:

./ut [ARGUMENT]

If the script is executed for the first time, it will prompt you for the absolute path of the unitime project on your local machine. If you ever happen to change the path of the unitime project, delete the .env file generated by the script and it will re-prompt you on next run.

Script arguments

  • ./ut init: builds the Docker images, use this the first time you run the project.
  • ./ut start: creates and starts the Docker containers. Use this whenever you want to start Tomcat and MySql to test the application; however, note that the application is still not deployed on the Tomcat server server.

The following commands require the containers to be started:

  • ./ut create-schema: creates the initial database schema. Use this the first time you run the project
  • ./ut populate: populates the database with data using SQL scripts in the unitime project. You can use this the first time you run the project. Currently, the available scripts are: woebegon-data.sql and blank-data.sql
  • ./ut build: packages and deploys the application to the Tomcat server. Use this the first time you run the project, or whenever you want to test your code changes.
  • ./ut deploy: deploys the application to the Tomcat server without re-compiling. Use this when you have compiled before and already have a .war file that you want to use regardless of the newest changes.
  • ./ut stop: stops the Docker containers. Use this when you are done.
  • ./ut help: display a list of arguments and their description. These include more arguments than the ones discussed here.

Example script usages

On running the project for the first time one can run this sequence of commands:

./ut init
./ut start
# You may want to open a new terminal tab/window now
./ut create-schema
./ut populate woebegon-data.sql
./ut build
# Wait till the project is packaged and deployed.
# The build and package progress can be viewed on the tty on which you ran ./ut build
# The deployment progress can be viewed on the tty on which you ran ./ut start

The application will be available at http://localhost:8080/UniTime/

On subsequent runs of the project, one can run this sequence of commands:

./ut start
./ut deploy # If you want to use the WAR created in the previous run

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published