- Example project that uses an xml file as data source.
- Using a single PostgreSQL database for metadata persisting.
- Dockerized project: both application and database runs in separate containers.
- Automation oriented: most settings are done via shell scripts and environment variables.
- Linux
- Docker
- Instructions: Install Docker Engine on Ubuntu | Docker Documentation
- Docker compose
- Instructions: Install the Compose standalone | Docker Documentation
- (Optional) Java (JRE/JDK)
- Only needed if you wish to run the application locally, with or without any IDE aid.
- Recommended JRE or JDK version 17.
- Instructions: OpenJDK: Download and install
- Docker
- Windows
- Docker and Docker Compose plugin
- Instructions: Install on Windows | Docker Documentation
- (Optional) Java (JRE/JDK)
- Only needed if you wish to run the application locally, with or without any IDE aid.
- Recommended JRE or JDK version 17.
- Instructions: Java Downloads | Oracle
- Docker and Docker Compose plugin
- Linux: Run the file deploy.sh with:
sh deploy.sh. - Windows: Run the file deploy.bat with:
deploy.batin an command prompt window with administrator privileges. - For didatic purposes (like connecting and checking the database, checking logs, etc), the application doesn't clean the created containers automatically when finishes it's execution, so just follow the Stopping section instructions in order to fully stop and clean the application containers.
- Between various other settings available in the file environment.env, the ones that you may be interested are the following:
- DATA_SOURCE_FILE: xml data source file full path from inside the container: Default /opt/app/files/registers.xml
- Note: If you change the /opt/app/files portion in the environment variables, you will need to change the ./docker/docker-compose.yml file in order to share the right volume.
- Note: Currently the data source file is located at: ./docker/files. It's mounted as a volume, sharing its contents with the container.
- DATA_SOURCE_FILE: xml data source file full path from inside the container: Default /opt/app/files/registers.xml
- Linux: Run the file stop.sh with:
sh stop.sh - Windows: Run the file stop.bat with:
stop.batin an command prompt window with administrator privileges.- This is intendedd to fully stop and remove the application containers.
- You don't need to stop the application if you want to run it again.
Log image with working example:
- Linux: spring-batch-xml-reader
- Windows: spring-batch-xml-reader