Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -2,3 +2,4 @@ node_modules/
npm-debug.log
tmp/
.exosphere
*.tfvars
9 changes: 1 addition & 8 deletions docker-compose/run_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ services:
volumes:
- ${APP_PATH}/tweets-service:/mnt
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: exosphere-tweets-service
Expand All @@ -41,7 +40,6 @@ services:
volumes:
- ${APP_PATH}/users-service:/mnt
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: exosphere-users-service
Expand All @@ -53,10 +51,7 @@ services:
restart: on-failure
mongo:
image: mongo:3.4.0
volumes:
- mongo__data_db:/data/db
environment:
DB_NAME: test-db
SERVICE_DATA: '{"exosphere-tweets-service":{},"exosphere-users-service":{},"space-tweet-web-service":{}}'
restart: on-failure
space-tweet-web-service:
Expand All @@ -69,13 +64,11 @@ services:
volumes:
- ${APP_PATH}/web-server:/mnt
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: space-tweet-web-service
depends_on:
- exocom
- mongo
restart: on-failure
volumes:
mongo__data_db: null
volumes: {}
9 changes: 1 addition & 8 deletions docker-compose/run_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ services:
context: ${APP_PATH}/tweets-service
dockerfile: Dockerfile.prod
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: exosphere-tweets-service
Expand All @@ -35,7 +34,6 @@ services:
context: ${APP_PATH}/users-service
dockerfile: Dockerfile.prod
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: exosphere-users-service
Expand All @@ -47,10 +45,7 @@ services:
restart: on-failure
mongo:
image: mongo:3.4.0
volumes:
- mongo__data_db:/data/db
environment:
DB_NAME: test-db
SERVICE_DATA: '{"exosphere-tweets-service":{},"exosphere-users-service":{},"space-tweet-web-service":{}}'
restart: on-failure
space-tweet-web-service:
Expand All @@ -60,13 +55,11 @@ services:
ports:
- 3000:3000
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: space-tweet-web-service
depends_on:
- exocom
- mongo
restart: on-failure
volumes:
mongo__data_db: null
volumes: {}
9 changes: 1 addition & 8 deletions docker-compose/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ services:
dockerfile: Dockerfile.dev
command: /node_modules/.bin/cucumber-js
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: exosphere-tweets-service
Expand All @@ -34,7 +33,6 @@ services:
dockerfile: Dockerfile.dev
command: /node_modules/.bin/cucumber-js
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: exosphere-users-service
Expand All @@ -43,23 +41,18 @@ services:
- mongo
mongo:
image: mongo:3.4.0
volumes:
- mongo__data_db:/data/db
environment:
DB_NAME: test-db
SERVICE_DATA: '{"exosphere-tweets-service":{},"exosphere-users-service":{},"space-tweet-web-service":{}}'
restart: on-failure
space-tweet-web-service:
build:
context: ${APP_PATH}/web-server
dockerfile: Dockerfile.dev
environment:
COLLECTION_NAME: test-collection
EXOCOM_HOST: exocom
MONGO_HOST: mongo
ROLE: space-tweet-web-service
depends_on:
- exocom
- mongo
volumes:
mongo__data_db: null
volumes: {}
12 changes: 6 additions & 6 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ variable "key_name" {
}

module "aws" {
source = "github.com/Originate/exosphere.git//terraform//aws?ref=30894145"
source = "github.com/Originate/exosphere.git//terraform//aws?ref=b0241967"

name = "space-tweet"
env = "${var.env}"
Expand All @@ -50,7 +50,7 @@ variable "exosphere-tweets-service_env_vars" {
variable "exosphere-tweets-service_docker_image" {}

module "exosphere-tweets-service" {
source = "github.com/Originate/exosphere.git//terraform//aws//worker-service?ref=30894145"
source = "github.com/Originate/exosphere.git//terraform//aws//worker-service?ref=b0241967"

name = "exosphere-tweets-service"

Expand All @@ -71,7 +71,7 @@ variable "exosphere-users-service_env_vars" {
variable "exosphere-users-service_docker_image" {}

module "exosphere-users-service" {
source = "github.com/Originate/exosphere.git//terraform//aws//worker-service?ref=30894145"
source = "github.com/Originate/exosphere.git//terraform//aws//worker-service?ref=b0241967"

name = "exosphere-users-service"

Expand All @@ -94,7 +94,7 @@ variable "space-tweet-web-service_docker_image" {}
variable "space-tweet-web-service_url" {}

module "space-tweet-web-service" {
source = "github.com/Originate/exosphere.git//terraform//aws//public-service?ref=30894145"
source = "github.com/Originate/exosphere.git//terraform//aws//public-service?ref=b0241967"

name = "space-tweet-web-service"

Expand All @@ -121,7 +121,7 @@ module "space-tweet-web-service" {
}

module "exocom_cluster" {
source = "github.com/Originate/exosphere.git//remote-dependency-templates//exocom//modules//exocom-cluster?ref=30894145"
source = "github.com/Originate/exosphere.git//remote-dependency-templates//exocom//modules//exocom-cluster?ref=b0241967"

availability_zones = "${module.aws.availability_zones}"
env = "${var.env}"
Expand All @@ -146,7 +146,7 @@ variable "exocom_env_vars" {
}

module "exocom_service" {
source = "github.com/Originate/exosphere.git//remote-dependency-templates//exocom//modules//exocom-service?ref=30894145"
source = "github.com/Originate/exosphere.git//remote-dependency-templates//exocom//modules//exocom-service?ref=b0241967"

cluster_id = "${module.exocom_cluster.cluster_id}"
cpu_units = "128"
Expand Down
2 changes: 1 addition & 1 deletion users-service/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ ENV PATH="/node_modules/.bin:${PATH}"

COPY . .

CMD ["lsc", "src/server.ls"]
CMD ["bin/start"]
5 changes: 5 additions & 0 deletions users-service/bin/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e

update-route53 $ROLE $INTERNAL_HOSTED_ZONE_NAME
lsc src/server.ls
Binary file added users-service/bin/update-route53
Binary file not shown.
10 changes: 7 additions & 3 deletions users-service/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ development:
remote:
cpu: 100
memory: 500
secrets:
- MONGODB_USER
- MONGODB_PW
environments:
production:
environment-variables:
INTERNAL_HOSTED_ZONE_NAME: production-space-tweet.local
secrets:
- MONGODB_USER
- MONGODB_PW