An application to record and see time tracks of employees. It interacts with a legacy application. It can be retrieved under: https://hub.docker.com/r/alirizasaral/timetracker/. It is necessary to run it with port 8080 on the same machine to work.
Example:
docker run -d -p 8080:8080 --name timetracker alirizasaral/timetracker:1
It is based on Vaadin (Java UI framework, version 21.0.1) and Java (16/17) with Spring Boot (Java framework, version 2.5.4).
This project can be used as a starting point to create your own Vaadin application with Spring Boot. It contains all the necessary configuration and some placeholder files to get you started.
The project is a standard Maven project. To run it from the command line,
type mvnw
(Windows), or ./mvnw
(Mac & Linux), then open
http://localhost:8081 in your browser.
You can also import the project to your IDE of choice as you would with any Maven project. Read more on how to set up a development environment for Vaadin projects (Windows, Linux, macOS).
To create a production build, call mvnw clean package -Pproduction
(Windows),
or ./mvnw clean package -Pproduction
(Mac & Linux).
This will build a JAR file with all the dependencies and front-end resources,
ready to be deployed. The file can be found in the target
folder after the build completes.
Once the JAR file is built, you can run it using
java -jar target/tempo2-1.0-SNAPSHOT.jar
MainView.java
insrc/main/java
contains the navigation setup (i.e., the side/top bar and the main menu). This setup uses App Layout.views
package insrc/main/java
contains the server-side Java views of your application.views
folder infrontend/
contains the client-side JavaScript views of your application.themes
folder infrontend/
contains the custom CSS styles.
- Read the documentation at vaadin.com/docs.
- Follow the tutorials at vaadin.com/tutorials.
- Watch training videos and get certified at vaadin.com/learn/training.
- Create new projects at start.vaadin.com.
- Search UI components and their usage examples at vaadin.com/components.
- Find a collection of solutions to common use cases in Vaadin Cookbook.
- Find Add-ons at vaadin.com/directory.
- Ask questions on Stack Overflow or join our Discord channel.
- Report issues, create pull requests in GitHub.
To build the Dockerized version of the project, run:
docker build . -t tempo2:latest
Once the Docker image is correctly built, you can test it locally using:
docker run -d -p 8081:8080 -e "SPRING_PROFILES_ACTIVE=docker" --name tempo2 tempo2:latest
(Optional) Setting environmental variables (e.g. with defaults):
-e "PORT=8080"
-e "LEGACY_BACKEND_BASE_URL=http://host.docker.internal:8080/records"
Afterwards it is accessible under: http://localhost:8081.
Stop it with the following command:
docker stop tempo2
Start it again with the following command:
docker start tempo2
(Optional) Stop the containers:
docker stop tempo2
docker stop timetracker
Delete containers:
docker container rm tempo2
docker container rm timetracker
Delete images:
docker image rm tempo2
(Optional) If Docker Hub was used for pulling image
docker image rm phipsl/tempo2:0.0.1-SNAPSHOT
docker image rm timetracker
The Docker image is downloadable under: https://hub.docker.com/repository/docker/phipsl/tempo2.