This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: docker:latest | |
services: | |
- docker:dind | |
variables: | |
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" | |
DOCKER_DRIVER: overlay | |
SPRING_PROFILES_ACTIVE: gitlab-ci | |
cache: | |
key: ${CI_COMMIT_REF_SLUG} | |
paths: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy: | |
image: | |
name: stefanotroia/ansible:latest | |
stage: deploy | |
script: | |
- printf "[ci_group]\n $SSH_SERVER ansible_ssh_user=$SSH_USER \n" > /etc/ansible/hosts | |
- cp $SSH_KEY key.pem && chmod 600 key.pem | |
- eval `keychain --eval` > /dev/null 2>&1 | |
- ssh-add key.pem | |
- ansible-playbook $CI_PROJECT_DIR/ansible-scripts/deploy.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: ansible_group | |
pre_tasks: | |
- name: 'System init' | |
include_tasks: docker-install.yml | |
tasks: | |
#[DOCKER] Create dockernetwork | |
- name: '[DOCKER] Create docker network' | |
become: yes | |
docker_network: | |
name: my_network#[NGINX] Run container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<plugin> | |
<groupId>com.google.cloud.tools</groupId> | |
<artifactId>jib-maven-plugin</artifactId> | |
<version>1.1.2</version> | |
<configuration> | |
<from> | |
<image>openjdk:8-jre-alpine</image> | |
</from> | |
<to> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
influxdb: | |
image: 'influxdb:latest' | |
container_name: influxDB | |
networks: | |
- tick-network | |
volumes: | |
- '/home/tick/influxdb/data:/var/lib/influxdb' | |
- '/home/tick/influxdb/config/:/etc/influxdb/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListeningExecutorService service = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ListeningExecutorService service = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(2)); | |
service.sumbit(()-> { | |
log.info("Async"); | |
//TODO LOGIC | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
rabbitmq: | |
host: 127.0.0.1 | |
port: 5672 | |
username: "username" | |
password: "password" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ListeningExecutorService service = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(10)); | |
@RabbitListener(queues = {DEMO}) | |
public void consumeMessages(Message message) { | |
service.submit(()-> {this.consumeMessage(strMsg);}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>io.projectreactor</groupId> | |
<artifactId>reactor-core</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>io.projectreactor.rabbitmq</groupId> | |
<artifactId>reactor-rabbitmq</artifactId> | |
</dependency> |
OlderNewer