Giter Club home page Giter Club logo

realestatehelper's Introduction

MySQL config

Enter mysql
> CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'SECRET';
> create database rental_fetches;
> GRANT ALL PRIVILEGES ON rental_fetches.* TO 'appuser'@'localhost';

To start Mysql:
sudo service mysqld start

In case of problems (i.e. running docker-compose fails in main-service (Spring boot app) with Access denied for user 'appuser'@'172.24.0.4' ). The reason can be with MySql password - it works for sure when password contains alpha-numeric characters (Hello, security, my old friend :))

ActiveMQ config

  • Install activemq
  • Go to installation folder (/your/path/apache-activemq-5.16.0/bin/) and run
    ./activemq start
  • ActiveMQ management url - http://localhost:8161/admin/

Set ActiveMQ Security
Add this config to conf file (location in Unix: /path/to/apache-activemq-X/conf/activemq.xml)

<plugins>
    <simpleAuthenticationPlugin anonymousAccessAllowed="false">
	<users>
	    <authenticationUser username="admin" password="<PASSWORD>" groups="admins, producers, consumers"/>
	</users>
    </simpleAuthenticationPlugin>
    <authorizationPlugin>
	<map>
	    <authorizationMap>
	        <authorizationEntries>
	            <authorizationEntry queue="rental" read="consumers" write="producers" admin="producers,consumers,admins" />    
	            <authorizationEntry topic="ActiveMQ.Advisory.>" read="consumers" write="producers" admin="producers,consumers,admins"/>
	            <authorizationEntry topic="rental" read="consumers" write="producers" admin="producers,consumers,admins"/>
	        </authorizationEntries>
	    </authorizationMap>
	</map>
    </authorizationPlugin>
</plugins>  

Keep in mind, <PASSWORD> should be configured as env variable for Docker compose

Wildfly

Download wildfly
Once downloaded, unzip and browse to WILDFLY_HOME/bin and run the add-user (.sh/.bat) script
http://127.0.0.1:9990/console/index.html
Manager user should be created
Once the user is added, run standalone (.sh/.bat) to start the server. If started successfully, browse to the following URL: http://127.0.0.1:9990/console/index.html

mvn -e clean package -DskipTests
This command packages the application. Notice that we have configured the Wildfly plugin to execute in the maven install phase with the goal deploy.

Once the build completes, browse to http://127.0.0.1:9990/console/index.html#deployments and we can see the deployed WAR file.

Tip in case of java.lang.OutOfMemoryError: Metaspace:
Undeploy and restart wildfly container

Tip in case of Failed to execute goal deploy: WFLYCTL0063: Composite operation was rolled back
Check running wildfly logs. Probably the issue can be with port 8080 being already in use. To check this and find id of a proces: sudo netstat -nlp | grep 8080

Telegram Bot

Bot creation is pretty straight-forward. Details could be found here: https://core.telegram.org/bots#2-how-do-bots-work

There's a… bot for that. Just talk to BotFather (described below) and follow a few simple steps.
Once you've created a bot and received your authorization token, head down to the Bot API manual to see what you can teach your bot to do.

Docker

For correct docker-compose execution with docker-compose run file with name ".env" should exist in current (app) folder.

For local Docker startup execute:
docker run --name my-redis -p 6379:6379 -v ~/redis-pers:/data redis:rc-alpine
docker run --name my-activemq -p 61616:61616 -p 8161:8161 -d rmohr/activemq:5.15.9

Tests

Tests use Testcontainer. They should be run in configured docker environment.
Docker should be able to run from current user (without sudo)

realestatehelper's People

Contributors

dariapindus avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.