Skip to content
This repository was archived by the owner on Jul 18, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
89ea3f4
removed pushkin submodules
May 26, 2017
5ca0318
added gww submodules
May 26, 2017
d765754
remove gww-front-end
May 26, 2017
13b50a4
readd gww-front-end
May 26, 2017
c53e232
updated namespace; updated local deploy instructions error
May 30, 2017
429ea46
fixed local deploy command
May 30, 2017
c9a6931
removed gww-worker; added which-english; fixed db connection issue
Jun 7, 2017
e149395
removing gww-worker
Jun 7, 2017
1c8595c
submodules
Jun 7, 2017
2c70e6e
removed old submodules
Jun 7, 2017
803812a
added submodules
Jun 7, 2017
f25e479
added exp-workers submodule
Jun 16, 2017
57c1221
made dockerfile bare
Jun 16, 2017
d462ae7
remove older workers submodule
Jun 16, 2017
dd08928
added workers submodule
Jun 16, 2017
1953531
submodules
Jun 16, 2017
57f5267
submodules
Jun 16, 2017
849c2fd
moving which-english worker
Jun 16, 2017
e49d9df
submodules
Jun 16, 2017
0686216
updated docker-compose files with whichenglish
Jun 16, 2017
81b4193
submodules
Jun 19, 2017
ddece0d
update whichenglish worker name in dockerfile
Jun 19, 2017
47637bc
temporary lowercase dockerhub id in debug; submodules
Jun 20, 2017
7b5c354
submodules
Jun 26, 2017
5b3df08
listener; refactoring to central experiments folder
Jun 28, 2017
cea7876
temporary rename
Jun 28, 2017
d3461f8
submodules; move experiments to submodule
Jun 28, 2017
f169525
listener progress; add nano to dockerfiles
Jul 6, 2017
6ffab0c
listener progress; submodules
Jul 8, 2017
91fee9d
fixed forced lowercase issue
Jul 8, 2017
4cf0b93
progress; submodules
Jul 13, 2017
5c1fc50
reorganized and finalized docker compose and rancher compose. only ex…
Jul 15, 2017
e62bc3f
submodules
Jul 15, 2017
e80229c
made services not global
Jul 18, 2017
5106928
use cron to remove listener quiz users without responses; submodules
Jul 26, 2017
af82ff4
docker-compose prod cron fix
Jul 26, 2017
131d92a
add .gitignore
Jul 26, 2017
cb8451f
submodules
Jul 26, 2017
16f73f3
Docker compose file with passwords/database URLs
marielajennings Oct 3, 2017
b1c0515
Generalized files with no exposed passwords
marielajennings Oct 3, 2017
3295a16
Revert "Generalized files with no exposed passwords"
marielajennings Oct 3, 2017
6ddd1ec
subtree
marielajennings Oct 4, 2017
dbd4f59
update repos
RobAWilkinson Oct 6, 2017
b615caa
Merge pull request #1 from gameswithwords/deploy-fix
marielajennings Oct 6, 2017
f568027
Update README.md
RobAWilkinson Feb 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
db-links.txt
39 changes: 18 additions & 21 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
[submodule "pushkin-api"]
path = pushkin-api
url = https://github.com/pushkin-consortium/pushkin-api.git
[submodule "pushkin-worker"]
path = pushkin-worker
url = https://github.com/pushkin-consortium/pushkin-worker.git
[submodule "pushkin-server"]
path = pushkin-server
url = https://github.com/pushkin-consortium/pushkin-server.git
[submodule "pushkin-db"]
path = pushkin-db
url = https://github.com/pushkin-consortium/pushkin-db.git
[submodule "pushkin-cron"]
path = pushkin-cron
url = https://github.com/pushkin-consortium/pushkin-cron.git
[submodule "pushkin-cli"]
path = pushkin-cli
url = https://github.com/pushkin-consortium/pushkin-cli.git
[submodule "pushkin-react"]
path = pushkin-react
url = https://github.com/pushkin-consortium/pushkin-react.git
[submodule "front-end"]
path = front-end
url = https://github.com/gameswithwords/front-end.git
[submodule "api"]
path = api
url = https://github.com/gameswithwords/api.git
[submodule "server"]
path = server
url = https://github.com/gameswithwords/server.git
[submodule "db-worker"]
path = db-worker
url = https://github.com/gameswithwords/db-worker.git
[submodule "cron"]
path = cron
url = https://github.com/gameswithwords/cron.git
[submodule "experiments"]
path = experiments
url = https://github.com/gameswithwords/experiments.git
7 changes: 4 additions & 3 deletions CreateTransactionDB.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
create table transactions (
CREATE TABLE transactions (
id SERIAL PRIMARY KEY,
query TEXT not null,
bindings TEXT
query TEXT NOT NULL,
bindings TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ It consists of 5 key parts
## Why Pushkin

## Assumptions
1. You are somewhat familiar with isntalling programs and understand what your terminal is and how to use it.
1. You are familiar with installing programs and understand what your terminal is and how to use it.
2. You have access to a text editor like sublime/notepad++/etc.
3. [Docker](http://docker.com) is installed on your machine


## Getting started

### Development Mode
1. docker-compose up -f docker-compose.debug.yml
1. docker-compose -f docker-compose.debug.yml up


## Deploying
Expand Down
1 change: 1 addition & 0 deletions api
Submodule api added at 7e66bc
7 changes: 7 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var config= {};

config.name = 'gww'

exports.getConfig = function() {
return config;
}
1 change: 1 addition & 0 deletions cron
Submodule cron added at c062e0
1 change: 1 addition & 0 deletions db-worker
Submodule db-worker added at e22289
107 changes: 67 additions & 40 deletions docker-compose.debug.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,103 @@
version: '2'
services:
nginx:
image: 'pushkinl3/pushkin-server:latest'
build:
context: ./pushkin-server
dockerfile: Dockerfile
ports:
- '80:80'
links:
- 'api:api'
api:
image: 'pushkinl3/pushkin-api:latest'
image: gameswithwords/api:latest
expose:
- '3000'
build:
context: ./pushkin-api
context: ./api
dockerfile: Dockerfile
volumes:
- './pushkin-api:/usr/src/app'
- ./api:/usr/src/app
command: bash start.debug.sh
depends_on:
- message-queue
environment:
- NODE_ENV=production
- 'AMPQ_ADDRESS=amqp://message-queue:5672'
- AMPQ_ADDRESS=amqp://message-queue:5672
links:
- message-queue
message-queue:
image: 'rabbitmq:management'
cron:
image: gameswithwords/cron:latest
build:
context: ./cron
dockerfile: Dockerfile
environment:
- AMPQ_ADDRESS=amqp://message-queue:5672
- API_ADDRESS=http://api:3000/api
- DATABASE_URL=postgres://postgres@db:5432/dev
- TRANSACTION_DATABASE_URL=postgres://postgres@transactiondb:5432/transactions-dev
links:
- message-queue
- db
- transactiondb
- api
db:
image: postgres:latest
environment:
- POSTGRES_DB=dev
- POSTGRES_USER=postgres
expose:
- 5672
- '5432'
ports:
- '8080:15672'
- '5432:5432'
db-worker:
image: 'pushkinl3/pushkin-db:latest'
image: gameswithwords/db-worker:latest
build:
context: ./pushkin-db
context: ./db-worker
dockerfile: Dockerfile
volumes:
- './pushkin-db:/usr/src/app'
- ./db-worker:/usr/src/app
command: bash start.debug.sh
depends_on:
- message-queue
environment:
- 'AMPQ_ADDRESS=amqp://message-queue:5672'
- 'DATABASE_URL=DB_URL'
- 'TRANSACTION_DATABASE_URL=T_DB_URL'
- AMPQ_ADDRESS=amqp://message-queue:5672
- DATABASE_URL=postgres://postgres@db:5432/dev
- TRANSACTION_DATABASE_URL=postgres://postgres@transactiondb:5432/transactions-dev
links:
- message-queue
- 'db:db'
- 'transactiondb:transactiondb'
db:
image: 'postgres:latest'
environment:
- POSTGRES_DB=pushkin-development
- POSTGRES_USER=postgres
cron:
image: 'pushkinl3/pushkin-cron:latest'
- db
- transactiondb
message-queue:
image: rabbitmq:management
expose:
- '5672'
ports:
- '8080:15672'
server:
image: gameswithwords/server:latest
build:
context: ./pushkin-cron
context: ./server
dockerfile: Dockerfile
environment:
- 'AMPQ_ADDRESS=amqp://message-queue:5672'
- 'DATABASE_URL=DB_URL'
ports:
- '80:80'
links:
- message-queue
- 'db:db'
- api
transactiondb:
image: 'pushkinl3/pushkin-transactiondb:latest'
image: gameswithwords/transactiondb:latest
build:
context: ./
dockerfile: Dockerfile.transactiondb
environment:
- POSTGRES_DB=transactions
- POSTGRES_DB=transactions-dev
- POSTGRES_USER=postgres
expose:
- '5432'
ports:
- '5433:5432'
listener-quiz:
image: gameswithwords/listener-quiz:latest
build:
context: ./workers/listener-quiz
dockerfile: Dockerfile
volumes:
- ./workers/listener-quiz:/usr/src/app
command: bash start.debug.sh
depends_on:
- message-queue
environment:
- AMPQ_ADDRESS=amqp://message-queue:5672
- QUEUE=listener-quiz
links:
- message-queue
118 changes: 79 additions & 39 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,98 @@
version: '2'
services:
api:
image: gameswithwords/api:latest
environment:
- AMPQ_ADDRESS=amqp://message-queue:5672
- NODE_ENV=production
links:
- message-queue
command:
- bash
- start.sh
labels:
io.rancher.scheduler.global: 'true'
cron:
image: 'pushkinl3/games-with-words-cron:latest'
image: gameswithwords/cron:latest
environment:
- 'AMPQ_ADDRESS=amqp://message-queue:5672'
- 'DATABASE_URL=DB_URL'
- 'TRANSACTION_DATABASE_URL=T_DB_URL'
- AMPQ_ADDRESS=amqp://message-queue:5672
- API_ADDRESS=http://api:3000/api
- DATABASE_URL=INSERT_HERE
- TRANSACTION_DATABASE_URL=INSERT_HERE
links:
- 'message-queue:message-queue'
api-balancer:
image: 'rancher/lb-service-haproxy:v0.4.9'
ports:
- '80:80/tcp'
- '8080:8080/tcp'
- message-queue
- api
labels:
io.rancher.container.agent.role: environmentAdmin
io.rancher.container.create_agent: 'true'
message-queue:
image: rabbitmq
expose:
- '5672'
io.rancher.scheduler.global: 'true'
db-worker:
image: 'pushkinl3/games-with-words-db-worker:latest'
image: gameswithwords/db-worker:latest
environment:
- 'AMPQ_ADDRESS=amqp://message-queue:5672'
- 'DATABASE_URL=DB_URL'
- 'TRANSACTION_DATABASE_URL=T_DB_URL'
- AMPQ_ADDRESS=amqp://message-queue:5672
- DATABASE_URL=INSERT_HERE
- TRANSACTION_DATABASE_URL=INSERT_HERE
- NODE_ENV=production
links:
- 'message-queue:message-queue'
- message-queue
command:
- bash
- start.sh
labels:
io.rancher.container.pull_image: always
nginx:
image: 'pushkinl3/games-with-words-nginx:latest'
links:
- 'api:api'
io.rancher.scheduler.global: 'true'
load-balancer:
image: rancher/lb-service-haproxy
ports:
- '80:80/tcp'
- '80'
- '443'
labels:
io.rancher.container.pull_image: always
api:
image: 'pushkinl3/games-with-words-api:latest'
io.rancher.scheduler.global: 'true'
io.rancher.container.agent.role: environmentAdmin
io.rancher.container.create_agent: 'true'
message-queue:
image: gameswithwords/message-queue:latest
environment:
- 'AMPQ_ADDRESS=amqp://message-queue:5672'
- NODE_ENV=production
CONFD_ARGS: --interval 5
RABBITMQ_CLUSTER_PARTITION_HANDLING: autoheal
RABBITMQ_NET_TICKTIME: '60'
volumes_from:
- message-queue-datavolume
labels:
io.rancher.scheduler.global: 'true'
io.rancher.sidekicks: message-queue-base,message-queue-datavolume
io.rancher.container.hostname_override: container_name
message-queue-base:
image: rabbitmq:3.6-management
environment:
RABBITMQ_ERLANG_COOKIE: message-queue-cookie
entrypoint:
- /opt/rancher/bin/run.sh
network_mode: container:message-queue
volumes_from:
- message-queue-datavolume
labels:
io.rancher.container.hostname_override: container_name
message-queue-datavolume:
image: rabbitmq:3.6-management
entrypoint:
- /bin/true
volumes:
- /etc/rabbitmq
- /opt/rancher/bin
labels:
io.rancher.container.start_once: 'true'
io.rancher.container.hostname_override: container_name
server:
image: gameswithwords/server:latest
labels:
io.rancher.scheduler.global: 'true'
listener-quiz:
image: gameswithwords/listener-quiz:latest
command: bash start.sh
depends_on:
- message-queue
environment:
- AMPQ_ADDRESS=amqp://message-queue:5672
- QUEUE=listener-quiz
links:
- 'message-queue:message-queue'
expose:
- '3000'
command:
- bash
- start.sh
- message-queue
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.global: 'true'
1 change: 1 addition & 0 deletions experiments
Submodule experiments added at 29d9e2
1 change: 1 addition & 0 deletions front-end
Submodule front-end added at 021d72
1 change: 0 additions & 1 deletion pushkin-api
Submodule pushkin-api deleted from 1ea4fa
1 change: 0 additions & 1 deletion pushkin-cli
Submodule pushkin-cli deleted from 5b1a98
1 change: 0 additions & 1 deletion pushkin-cron
Submodule pushkin-cron deleted from 3033dd
1 change: 0 additions & 1 deletion pushkin-db
Submodule pushkin-db deleted from 4f0429
1 change: 0 additions & 1 deletion pushkin-react
Submodule pushkin-react deleted from 04f944
1 change: 0 additions & 1 deletion pushkin-server
Submodule pushkin-server deleted from dc282a
1 change: 0 additions & 1 deletion pushkin-worker
Submodule pushkin-worker deleted from 9fddf9
Loading