diff --git a/share/Dockerfile b/share/Dockerfile new file mode 100644 index 000000000..ef01e9dbf --- /dev/null +++ b/share/Dockerfile @@ -0,0 +1,5 @@ +FROM maven:3.5.4-jdk-8-alpine +MAINTAINER share +ADD ./ /share +RUN cd /share && mvn package +ENTRYPOINT ["java","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n","-jar","/share/target/sharingMicroService-0.0.1.jar"] \ No newline at end of file diff --git a/share/README.md b/share/README.md index 4e21509bf..2efb2e790 100644 --- a/share/README.md +++ b/share/README.md @@ -1 +1,41 @@ -Source folder for sharing microservice written on java \ No newline at end of file +# Share +The purpose of the Share service is to publish posts, job vacancies to be exact, on different web sites. Currently it supports following websites: +* [Diesel Forum](http://diesel.elcat.kg/) +* [JOB.KG](http://www.job.kg/) +* [Facebook](https://www.facebook.com/) + +## Getting started +The instructions bellow for Ubuntu Linux 14.04 LTS and above +### Prerequisites +To be able to start the project, following applications must be installed: +* docker +* docker-compose +* git + +``` +$ apt update +$ apt install git docker docker-compose +``` + +### Run project +Clone the project from github repository https://github.com/ZenSoftIO/hr-crm +``` +$ git clone https://github.com/ZenSoftIO/hr-crm +``` +go to project folder +``` +$ cd ./share +``` +run the docker-compose file with `build` flag +``` +$ docker-compose up --build +``` +### Usage +RabbitMQ is used as a communication method. The service is configured for `share` exchange. The project is configured to read data on a `json` format. + +### Credits +* [Temirlan Renatov](https://github.com/PlusRT) +* [Aidar Aibekov](https://github.com/aidar-aibekov) +* [Dastan Namazov](https://github.com/kb1prb13) +* [Azamat Derkenbaev](https://github.com/derkenbaev) +* [Aziret Toktoraliev](https://github.com/aziret26) diff --git a/share/docker-compose.yml b/share/docker-compose.yml new file mode 100644 index 000000000..54a73002c --- /dev/null +++ b/share/docker-compose.yml @@ -0,0 +1,27 @@ +version: '2' + +services: + share_postgresql: + image: postgres:latest + container_name: share_postgresql + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=root + - POSTGRES_DB=share_micro_service + ports: + - "5432:5432" + hostname: share_postgresql + + share_service: + build: + context: ./ + container_name: share_micro_service + depends_on: + - share_postgresql + links: + - share_postgresql + + env_file: + - .env/.rabbitmq + - .env/.postgresql + diff --git a/share/src/test/java/io.zensoft.share/SharingMicroServiceApplicationTest.java b/share/src/test/java/io.zensoft.share/SharingMicroServiceApplicationTest.java deleted file mode 100644 index 0e41590ef..000000000 --- a/share/src/test/java/io.zensoft.share/SharingMicroServiceApplicationTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package io.zensoft.share; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@SpringBootTest -public class SharingMicroServiceApplicationTest { - - @Test - public void contextLoads() { - } - -} \ No newline at end of file