Skip to content

Commit

Permalink
feature/elasticsearch-upgrade-fix (#276)
Browse files Browse the repository at this point in the history
* Added kibana to docker-compose

* Added jobs table to use database as queue

* Linted code
  • Loading branch information
matthew-inamdar authored Nov 15, 2020
1 parent deaf688 commit 9f78a8f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
32 changes: 32 additions & 0 deletions database/migrations/2020_11_15_190128_create_jobs_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateJobsTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}

/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('jobs');
}
}
1 change: 1 addition & 0 deletions develop
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export DB_NAME=${DB_NAME:-connected_kingston}
export DB_USER=${DB_USER:-connected_kingston}
export DB_PASS=${DB_PASS:-secret}
export ELASTICSEARCH_PORT=${ELASTICSEARCH_PORT:-9200}
export KIBANA_PORT=${KIBANA_PORT:-5601}
export CFN_TEMPLATE=${CFN_TEMPLATE:-cloudformation}

# Set the docker-compose files to use.
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ services:
ports:
- "${ELASTICSEARCH_PORT}:9200"

kibana:
image: kibana:7.9.3
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
ports:
- "${KIBANA_PORT}:5601"
depends_on:
- elasticsearch

troposphere:
image: royal-borough-kingston/ck-api/troposphere
build:
Expand Down

0 comments on commit 9f78a8f

Please sign in to comment.