Merge pull request #8 from frikky/dev
Update docker-compose and local configurations for deployment
This commit is contained in:
@@ -6,4 +6,4 @@ ENVIRONMENT_NAME=Shuffle
|
||||
BACKEND_HOSTNAME=shuffle-backend
|
||||
BACKEND_PORT=5010
|
||||
FRONTEND_PORT=3001
|
||||
OUTER_HOSTNAME=192.168.3.6
|
||||
OUTER_HOSTNAME=shuffle-backend
|
||||
@@ -1,6 +1,7 @@
|
||||
# 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.
|
||||
|
||||
**It's in BETA, so be careful**
|
||||
|
||||

|
||||
|
||||
@@ -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
|
||||
|
||||
# Update for users:
|
||||
* Build from scratch (docker-compose)
|
||||
* Push stable builds to Dockerhub
|
||||
|
||||
### Migration issues:
|
||||
* Some workflows where items have multiple parents don't work.
|
||||
* Fix dummy.json (GCP config) - bypass this somehow.
|
||||
|
||||
+15
-11
@@ -5580,18 +5580,9 @@ func healthCheckHandler(resp http.ResponseWriter, request *http.Request) {
|
||||
fmt.Fprint(resp, "OK")
|
||||
}
|
||||
|
||||
func init() {
|
||||
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)
|
||||
}
|
||||
|
||||
func runInit(ctx context.Context) {
|
||||
// Setting stats for backend starts (failure count as well)
|
||||
err = increaseStatisticsField(ctx, "backend_executions", "", 1)
|
||||
err := increaseStatisticsField(ctx, "backend_executions", "", 1)
|
||||
if err != nil {
|
||||
log.Printf("Failed increasing local stats: %s", err)
|
||||
}
|
||||
@@ -5664,6 +5655,19 @@ func 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.HandleFunc("/api/v1/_ah/health", healthCheckHandler)
|
||||
|
||||
+10
-11
@@ -1,9 +1,7 @@
|
||||
version: '3'
|
||||
# Remove database port
|
||||
# Remove backend port
|
||||
services:
|
||||
frontend:
|
||||
build: ./frontend
|
||||
#build: ./frontend
|
||||
image: frikky/shuffle:frontend
|
||||
container_name: shuffle-frontend
|
||||
hostname: shuffle-frontend
|
||||
@@ -12,8 +10,10 @@ services:
|
||||
networks:
|
||||
- shuffle
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
database:
|
||||
build: ./backend/database
|
||||
#build: ./backend/database
|
||||
image: frikky/shuffle:database
|
||||
container_name: shuffle-database
|
||||
hostname: shuffle-database
|
||||
@@ -23,12 +23,13 @@ services:
|
||||
volumes:
|
||||
- /etc/shuffle:/etc/shuffle
|
||||
backend:
|
||||
build: ./backend
|
||||
#build: ./backend
|
||||
image: frikky/shuffle:backend
|
||||
container_name: shuffle-backend
|
||||
hostname: ${BACKEND_HOSTNAME}
|
||||
# Here for debugging:
|
||||
ports:
|
||||
- "${BACKEND_PORT}:${BACKEND_PORT}"
|
||||
- "${BACKEND_PORT}:5001"
|
||||
networks:
|
||||
- shuffle
|
||||
volumes:
|
||||
@@ -36,13 +37,11 @@ services:
|
||||
environment:
|
||||
- ORG_ID=${ORG_ID}
|
||||
- DATASTORE_EMULATOR_HOST=shuffle-database:8000
|
||||
- BACKEND_PORT=${BACKEND_PORT}
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- database
|
||||
- frontend
|
||||
orborus:
|
||||
build: ./functions/onprem/orborus
|
||||
#build: ./functions/onprem/orborus
|
||||
image: frikky/shuffle:orborus
|
||||
container_name: shuffle-orborus
|
||||
hostname: shuffle-orborus
|
||||
@@ -56,10 +55,10 @@ services:
|
||||
- BASE_URL=http://${OUTER_HOSTNAME}:${BACKEND_PORT}
|
||||
restart: unless-stopped
|
||||
app_sdk:
|
||||
build: ./functions/onprem/app_sdk
|
||||
#build: ./functions/onprem/app_sdk
|
||||
image: frikky/shuffle:app_sdk
|
||||
worker:
|
||||
build: ./functions/onprem/worker
|
||||
#build: ./functions/onprem/worker
|
||||
image: frikky/shuffle:worker
|
||||
networks:
|
||||
shuffle:
|
||||
|
||||
+2
-2
@@ -38,12 +38,12 @@ import AlertTemplate from "react-alert-template-basic";
|
||||
import { positions, Provider } from "react-alert";
|
||||
|
||||
// Testing - localhost
|
||||
//const globalUrl = "http://192.168.3.6:5001"
|
||||
const globalUrl = "http://192.168.3.6:5001"
|
||||
//console.log("HOST: ", process.env)
|
||||
|
||||
|
||||
// Production - backend proxy forwarding in nginx
|
||||
const globalUrl = window.location.origin
|
||||
//const globalUrl = window.location.origin
|
||||
|
||||
const surfaceColor = "#27292D"
|
||||
const inputColor = "#383B40"
|
||||
|
||||
Reference in New Issue
Block a user