Rabbit MQ - needed for barker
This commit is contained in:
Amritanshu Agrawal 2020-10-17 12:28:36 +05:30
parent 426bd8e82a
commit 5c22100376
5 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,2 @@
<?php
phpinfo();

View File

@ -0,0 +1,19 @@
server {
listen {{ http_port }};
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name {{ http_host }};
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}

24
rabbitmq/playbook.yml Executable file
View File

@ -0,0 +1,24 @@
#################################################
# DO Community Playbooks: Docker
#################################################
---
- hosts: all
become: true
vars_files:
- vars/default.yml
tasks:
- name: Pull default RabbitMQ image
docker_image:
name: "{{ image_name }}"
source: pull
- name: Create RabbitMQ container
docker_container:
name: "{{ container_name }}"
image: "{{ image_name }}"
state: started
restart_policy: "unless-stopped"
published_ports:
- 5672:5672

46
rabbitmq/readme.md Normal file
View File

@ -0,0 +1,46 @@
# Docker on Ubuntu 18.04
This playbook will install Docker an Ubuntu 18.04 machine, as explained in the guide on
[How to Use Ansible to Install and Set Up Docker on Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-install-and-set-up-docker-on-ubuntu-18-04).
A number of containers will be created with the options specified in the `vars/default.yml` variable file.
## Settings
- `create_containers`: number of containers to create.
- `default_container_name`: default name for new containers.
- `default_container_image`: default image for new containers.
- `default_container_command`: default command to run on new containers.
## Running this Playbook
Quick Steps:
### 1. Obtain the playbook
```shell
git clone https://github.com/do-community/ansible-playbooks.git
cd ansible-playbooks/docker_ubuntu1804
```
### 2. Customize Options
```shell
nano vars/default.yml
```
```yml
#vars/default.yml
---
create_containers: 4
default_container_name: docker
default_container_image: ubuntu
default_container_command: sleep 1d
```
### 3. Run the Playbook
```command
ansible-playbook -l [target] -i [inventory file] -u [remote user] playbook.yml
```
For more information on how to run this Ansible setup, please check this guide: [How to Use Ansible to Install and Set Up Docker on Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-install-and-set-up-docker-on-ubuntu-18-04).

View File

@ -0,0 +1,4 @@
---
container_name: rabbit
image_name: rabbitmq:alpine