diff --git a/README.md b/README.md index df97891d9104de4ca91728f207a9696b34933293..5cdc11ec6cdf610d5aeb871ef6e3db61c4bba245 100644 --- a/README.md +++ b/README.md @@ -34,26 +34,40 @@ The generated artifacts are then referenced from the .proto repo as Maven depend Unit tests ``` -# How to build -1. Make sure there's Java 10 installed. -2. Get proper Maven settings.xml file and place it under ~/.m2 directory. This is needed because of the proto artifactory repo. -3. Run `mvn clean install` -4. (Optional, developers only) If you're using Eclipse, make sure you are on Eclipse Photon version at least. +# SetUp info for developers -# How to run -1. Make sure there's Cassandra reachable somewhere within your network. -For developers: the 'dev' profile (src/main/resources/application-dev.yml) assumes Cassandra will be reachable on localhost:9042. -For production: few environment variables should be set (see src/main/resources/application-production.yml). + For starting current service you must do next: + 1. Install JDK 10 for project and JDK 8 for Cassandra DB + 2. Install Cassandra + a. If you use a Windows machine, you must save in JAVA_HOME variable path to jdk8. + Install python 2.7. + Download 7z or other archive manager and extract Cassandra's files to a necessary directory + Delete from cassandra.bat file -XX:+UseParNewGC^ . + Start cassandra.bat + b. With Linux, we have the same behavior + 3. Install maven and add to .m2 folder settings.xml (ping your teamLead with this issue) + 4. Set to VM options dev profile " -Dspring.profiles.active=dev" + 5. Start application + If you're using Eclipse, make sure you are on Eclipse Photon version at least. -2. Use your IDE to start the Spring Boot Application (remember to set the 'Dev' profile) or run the Java application as: -`java -jar account-service.jar --spring.profiles.active=dev` +# SetUp for DevOps -# Build the Docker image +## How to build + 1. Make sure there's Java 10 installed. + 2. Get proper Maven settings.xml file and place it under ~/.m2 directory. This is needed because of the proto artifactory repo. + 3. Run `mvn clean install` + +## How to run + Make sure there's Cassandra reachable somewhere within your network. + For production: few environment variables should be set (see src/main/resources/application-production.yml). + + +## Build the Docker image ``` docker build -t account-service . ``` -# Run the containerized application +## Run the containerized application ``` docker run --rm -ti -p 8080:8080 -p 6565:6565 account-service ```