Permalink
Browse files

Dockerized Postgres, tests indicate everything is gravy.

  • Loading branch information...
lavalamp- committed Dec 6, 2017
1 parent b67f6f1 commit d032709c5416d259060723b0b5363b7f446928db
@@ -28,7 +28,7 @@ SECRET_KEY = '[[DJANGO_SECRET]]'
DEBUG = True
ALLOWED_HOSTS = [
[[ALLOWED_HOSTS_LIST]]
'127.0.0.1'
]
@@ -87,11 +87,11 @@ WSGI_APPLICATION = 'wsbackend.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': '[[DB_NAME]]',
'USER': '[[DB_USER]]',
'PASSWORD': '[[DB_PASSWORD]]',
'HOST': '[[DB_HOST]]',
'PORT': '[[DB_PORT]]',
'NAME': 'websight',
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': 'postgres',
'PORT': '5432',
}
}
@@ -161,7 +161,8 @@ REST_FRAMEWORK = {
CORS_ORIGIN_WHITELIST = (
[[CORS_ORIGINS]]
'localhost:8001',
'127.0.0.1:8001'
)
CORS_ALLOW_CREDENTIALS = True
@@ -162,7 +162,7 @@ redis_port = 6379
rest_min_network_mask_length = 16
rest_max_network_mask_length = 32
rest_domains_file_cutoff = 200
rest_domain = [[REPLACE]]
rest_domain = http://127.0.0.1:8001/
[Selenium]
0 data/postgres/.gitkeep 100644 → 100755
No changes.
@@ -10,6 +10,7 @@ services:
links:
- elasticsearch
- postgres
- rabbitmq
ports:
- "8000:8000"
tasknode:
@@ -20,6 +21,7 @@ services:
links:
- elasticsearch
- postgres
- rabbitmq
redis:
image: redis:latest
hostname: ws-redis
@@ -30,6 +32,8 @@ services:
- "./data/elasticsearch:/usr/share/elasticsearch/data"
ports:
- "9200:9200"
environment:
- ES_JAVA_OPTS=-Xms1024m -Xmx1024m
rabbitmq:
image: rabbitmq:3-management
hostname: ws-rabbitmq
@@ -55,7 +59,7 @@ services:
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_DB=websight
volumes:
- "./data/postgres/data:/var/lib/postgresql/data"
ports:
- "5432:5432"
- "./data/postgres:/var/lib/postgresql/data"
@@ -1,7 +1,14 @@
#!/bin/bash
SLEEP_TIME=20
docker-compose up -d
echo "Now sleeping for $SLEEP_TIME seconds to allow database to bootstrap..."
sleep $SLEEP_TIME
echo "Now invoking 'initialize_data_stores.sh' script on tasknode..."
TASKNODE="$(docker ps | grep ws | grep tasknode | awk '{print $1}')"
echo "Tasknode ID is $TASKNODE..."
docker exec -it $TASKNODE scripts/initialize_data_stores.sh
echo "Data stores should now be initialized. Shutting things down..."
docker-compose stop
docker-compose rm
docker-compose rm -f
@@ -1,7 +1,14 @@
#!/bin/bash
SLEEP_TIME=20
docker-compose up -d
TASKNODE="$(docker ps | grep ws | grep api | awk '{print $1}')"
docker exec -it $TASKNODE scripts/migrate_and_test.sh
echo "Now sleeping for $SLEEP_TIME seconds to allow Web Sight to bootstrap..."
sleep $SLEEP_TIME
echo "Now invoking 'migrate_and_test.sh' script on API node..."
API="$(docker ps | grep ws | grep api | awk '{print $1}')"
echo "API ID is $API..."
docker exec -it $API scripts/migrate_and_test.sh
echo "Tests completed! Shutting things down..."
docker-compose stop
docker-compose rm
docker-compose rm -f
@@ -1,7 +1,14 @@
#!/bin/bash
SLEEP_TIME=20
docker-compose up -d
echo "Now sleeping for $SLEEP_TIME seconds to allow Web Sight to bootstrap..."
sleep $SLEEP_TIME
echo "Now invoking 'check_deployment.sh' script on tasknode..."
TASKNODE="$(docker ps | grep ws | grep tasknode | awk '{print $1}')"
echo "Tasknode ID is $TASKNODE..."
docker exec -it $TASKNODE scripts/check_deployment.sh
echo "Deployment checker completed! Shutting things down..."
docker-compose stop
docker-compose rm
docker-compose rm -f
@@ -1,7 +1,14 @@
#!/bin/bash
SLEEP_TIME=20
docker-compose up -d
echo "Now sleeping for $SLEEP_TIME seconds to allow Web Sight to bootstrap..."
sleep $SLEEP_TIME
echo "Now invoking 'migrate_and_test.sh' script on tasknode..."
TASKNODE="$(docker ps | grep ws | grep tasknode | awk '{print $1}')"
echo "Tasknode ID is $TASKNODE..."
docker exec -it $TASKNODE scripts/migrate_and_test.sh
echo "Tests completed! Shutting things down..."
docker-compose stop
docker-compose rm
docker-compose rm -f

0 comments on commit d032709

Please sign in to comment.