Loads from Dockerhub rather than local builds. Should remove loads of errors.

This commit is contained in:
frikky
2020-05-21 11:51:10 +02:00
parent b4d94e803f
commit df9e719cff
4 changed files with 32 additions and 26 deletions
+5
View File
@@ -1,6 +1,7 @@
# Shuffle # Shuffle
[Shuffle](https://shuffler.io) is an automation platform for your security stack. It leverages docker for scaling and OpenAPI for integrations. It has the possibility to run across multiple isolated environments, and gives you powerful tools to track progress. [Shuffle](https://shuffler.io) is an automation platform for your security stack. It leverages docker for scaling and OpenAPI for integrations. It has the possibility to run across multiple isolated environments, and gives you powerful tools to track progress.
**It's in BETA, so be careful**
![Example Shuffle webhook integration](shuffle_webhook.png) ![Example Shuffle webhook integration](shuffle_webhook.png)
@@ -100,6 +101,10 @@ There will be a major overhaul to the backend specifically. I'm currently moving
``` ```
* Mail: Use appengine and connect to sendmail * Mail: Use appengine and connect to sendmail
# Update for users:
* Build from scratch (docker-compose)
* Push stable builds to Dockerhub
### Migration issues: ### Migration issues:
* Some workflows where items have multiple parents don't work. * Some workflows where items have multiple parents don't work.
* Fix dummy.json (GCP config) - bypass this somehow. * Fix dummy.json (GCP config) - bypass this somehow.
+15 -11
View File
@@ -5580,18 +5580,9 @@ func healthCheckHandler(resp http.ResponseWriter, request *http.Request) {
fmt.Fprint(resp, "OK") fmt.Fprint(resp, "OK")
} }
func init() { func runInit(ctx context.Context) {
var err error
ctx := context.Background()
log.Printf("Running INIT process")
dbclient, err = datastore.NewClient(ctx, gceProject)
if err != nil {
log.Fatalf("DBclient error during init: %s", err)
}
// Setting stats for backend starts (failure count as well) // Setting stats for backend starts (failure count as well)
err = increaseStatisticsField(ctx, "backend_executions", "", 1) err := increaseStatisticsField(ctx, "backend_executions", "", 1)
if err != nil { if err != nil {
log.Printf("Failed increasing local stats: %s", err) log.Printf("Failed increasing local stats: %s", err)
} }
@@ -5664,6 +5655,19 @@ func init() {
} }
log.Printf("Finished INIT") log.Printf("Finished INIT")
}
func init() {
var err error
ctx := context.Background()
log.Printf("Running INIT process")
dbclient, err = datastore.NewClient(ctx, gceProject)
if err != nil {
log.Printf("DBclient error during init: %s", err)
}
go runInit(ctx)
r := mux.NewRouter() r := mux.NewRouter()
r.HandleFunc("/api/v1/_ah/health", healthCheckHandler) r.HandleFunc("/api/v1/_ah/health", healthCheckHandler)
+10 -13
View File
@@ -1,9 +1,7 @@
version: '3' version: '3'
# Remove database port
# Remove backend port
services: services:
frontend: frontend:
build: ./frontend #build: ./frontend
image: frikky/shuffle:frontend image: frikky/shuffle:frontend
container_name: shuffle-frontend container_name: shuffle-frontend
hostname: shuffle-frontend hostname: shuffle-frontend
@@ -12,25 +10,26 @@ services:
networks: networks:
- shuffle - shuffle
restart: unless-stopped restart: unless-stopped
depends_on:
- backend
database: database:
build: ./backend/database #build: ./backend/database
image: frikky/shuffle:database image: frikky/shuffle:database
container_name: shuffle-database container_name: shuffle-database
hostname: shuffle-database hostname: shuffle-database
ports:
- "8000:8000"
networks: networks:
- shuffle - shuffle
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- /etc/shuffle:/etc/shuffle - /etc/shuffle:/etc/shuffle
backend: backend:
build: ./backend #build: ./backend
image: frikky/shuffle:backend image: frikky/shuffle:backend
container_name: shuffle-backend container_name: shuffle-backend
hostname: ${BACKEND_HOSTNAME} hostname: ${BACKEND_HOSTNAME}
# Here for debugging:
ports: ports:
- "${BACKEND_PORT}:${BACKEND_PORT}" - "${BACKEND_PORT}:5001"
networks: networks:
- shuffle - shuffle
volumes: volumes:
@@ -38,13 +37,11 @@ services:
environment: environment:
- ORG_ID=${ORG_ID} - ORG_ID=${ORG_ID}
- DATASTORE_EMULATOR_HOST=shuffle-database:8000 - DATASTORE_EMULATOR_HOST=shuffle-database:8000
- BACKEND_PORT=${BACKEND_PORT}
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
- database - database
- frontend
orborus: orborus:
build: ./functions/onprem/orborus #build: ./functions/onprem/orborus
image: frikky/shuffle:orborus image: frikky/shuffle:orborus
container_name: shuffle-orborus container_name: shuffle-orborus
hostname: shuffle-orborus hostname: shuffle-orborus
@@ -58,10 +55,10 @@ services:
- BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT} - BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT}
restart: unless-stopped restart: unless-stopped
app_sdk: app_sdk:
build: ./functions/onprem/app_sdk #build: ./functions/onprem/app_sdk
image: frikky/shuffle:app_sdk image: frikky/shuffle:app_sdk
worker: worker:
build: ./functions/onprem/worker #build: ./functions/onprem/worker
image: frikky/shuffle:worker image: frikky/shuffle:worker
networks: networks:
shuffle: shuffle:
+2 -2
View File
@@ -38,12 +38,12 @@ import AlertTemplate from "react-alert-template-basic";
import { positions, Provider } from "react-alert"; import { positions, Provider } from "react-alert";
// Testing - localhost // Testing - localhost
//const globalUrl = "http://192.168.3.6:5001" const globalUrl = "http://192.168.3.6:5001"
//console.log("HOST: ", process.env) //console.log("HOST: ", process.env)
// Production - backend proxy forwarding in nginx // Production - backend proxy forwarding in nginx
const globalUrl = window.location.origin //const globalUrl = window.location.origin
const surfaceColor = "#27292D" const surfaceColor = "#27292D"
const inputColor = "#383B40" const inputColor = "#383B40"