This file contains hidden or 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
| const errorSchema = require('../.common/error-schema') | |
| const authController = require('./auth-controller') | |
| const authSchema = require('./auth-schema') | |
| module.exports = [{ | |
| method: 'POST', | |
| url: '/api/auth/register', | |
| schema: { | |
| body: authSchema.register.body, | |
| response: { |
This file contains hidden or 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
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name roomler.live; # replace with your domain | |
| return 301 https://$server_name$request_uri; | |
| } | |
| # HTTPS server | |
| # | |
| server { |
This file contains hidden or 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
| user nginx; | |
| pid /var/run/nginx.pid; | |
| ################################################################################## | |
| # nginx.conf Performance Tuning: https://github.com/denji/nginx-tuning | |
| ################################################################################## | |
| # you must set worker processes based on your CPU cores, nginx does not benefit from setting more than that | |
| worker_processes auto; #some last versions calculate it automatically |
This file contains hidden or 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
| - name: Mongo Swarm - Check c-01 service | |
| shell: > | |
| docker ps -qf label=com.docker.swarm.service.name=mongo_c-01 | awk '{ print $0 }' | |
| changed_when: false | |
| register: "c_01" | |
| tags: [mongo-swarm] | |
| - name: Mongo Swarm - Initialize <<configrs>> status | |
| shell: > | |
| docker exec -it {{ c_01.stdout }} bin/bash -c "echo 'rs.status()' | mongo" |
This file contains hidden or 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
| - name: Mongo Swarm - Checking Mongo Docker Stack | |
| shell: > | |
| docker stack ls | awk '{ if ($1 == "mongo") { print $1 } }' | |
| changed_when: false | |
| register: "mongo_stack" | |
| tags: [mongo-swarm] | |
| - name: Mongo Swarm - Deploying Mongo Docker Stack | |
| shell: "docker stack deploy --compose-file /vagrant/ansible/roles/mongo-swarm/docker_stack.yml mongo" | |
| when: mongo_stack.stdout != 'mongo' and inventory_hostname == docker_swarm_primary_manager |
This file contains hidden or 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
| - name: Mongo Swarm - Checking Docker Node labels | |
| shell: | | |
| docker node ls -q | \ | |
| xargs docker node inspect -f \ | |
| '\{\{ .ID \}\} [\{\{ .Description.Hostname \}\}]: \{\{ range $k, $v := .Spec.Labels \}\}\{\{ $k \}\}=\{\{ $v \}\} \{\{end\}\}' | |
| register: "docker_node_labels" | |
| changed_when: false | |
| check_mode: no | |
| become: true | |
| when: > |
This file contains hidden or 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
| - name: Mongo Swarm - check <<mongo>> Docker Network exists | |
| shell: > | |
| docker network ls | awk '{ if ($2 == "mongo") { print $2 } }' | |
| changed_when: false | |
| register: "mongo_network" | |
| tags: [mongo-swarm] | |
| - name: Mongo Swarm - Create missing Docker network <<mongo>> | |
| shell: "docker network create --attachable --driver=overlay --subnet 11.0.0.0/24 mongo" | |
| when: mongo_network.stdout != 'mongo' and inventory_hostname == docker_swarm_primary_manager |
This file contains hidden or 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.3" | |
| networks: | |
| mongo: | |
| external: true | |
| mongos: | |
| external: true | |
| services: | |
| d-01: |
This file contains hidden or 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
| - name: Docker Swarm - Checking Swarm Mode status | |
| command: "docker info" | |
| register: "docker_info" | |
| changed_when: false | |
| check_mode: no | |
| become: true | |
| tags: [docker-swarm] | |
| - name: Docker Swarm - Initializing Docker Swarm Mode on first manager | |
| command: > |
This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure(2) do |config| | |
| if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil | |
| config.vm.synced_folder ".", "/vagrant", mount_options: ["dmode=700,fmode=600"] | |
| config.vm.synced_folder "/data", "/data", type: "rsync", rsync__auto: true, mount_options: ["dmode=777,fmode=777"] | |
| else | |
| config.vm.synced_folder ".", "/vagrant" | |
| config.vm.synced_folder "/data", "/data", type: "rsync", rsync__auto: true, mount_options: ["dmode=777,fmode=777"] |
NewerOlder