Skip to content
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 .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PORT: 8080
HOST: localhost
ENABLE_TLS: false
CERT_FILE: "/certs/server.crt"
CERT_KEY_FILE: "/certs/server.key"
Expand Down
3 changes: 2 additions & 1 deletion cmd/soarca/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ func main() {
fmt.Print(banner)
log.Info("Version: ", Version)
log.Info("Buildtime: ", Buildtime)
log.Info("Host: ", Host)

err := godotenv.Load(".env")
if err != nil {
log.Warning("Failed to read env variable, but will continue")
}
Host = "localhost:" + utils.GetEnv("PORT", "8080")
Host = utils.GetEnv("HOST", "localhost") + ":" + utils.GetEnv("PORT", "8080")
api.SwaggerInfo.Host = Host

// Version is only available here
Expand Down
1 change: 1 addition & 0 deletions deployments/docker/soarca/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
image: docker.io/cossas/soarca:latest
container_name: soarca_server
environment:
HOST: localhost
PORT: 8080
SOARCA_ALLOWED_ORIGINS: "*"
GIN_MODE: "release"
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ SOARCA reads its configuration from the environment variables or a `.env` file.

{{< tabpane langEqualsHeader=false >}}
{{< tab header="`.env`" lang="txt" >}}
HOST: localhost
PORT: 8080
SOARCA_ALLOWED_ORIGINS: "*"
GIN_MODE: "release"
Expand Down
13 changes: 8 additions & 5 deletions docs/content/en/docs/installation-configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ After completing the [Getting Started](/docs/getting-started/_index.md) setup fo

| Variable | Content | Description |
|----------------------------|-----------------------------------|-----------------------------------------------------------------------------|
| HOST | `localhost` | Set the host of SOARCA so the swagger GUI is correctly pointed to the SOARCA API. Default is `localhost`. |
| PORT | `8080` | Set the exposed port of SOARCA. Default is `8080`. |
| ENABLE_TLS | `false` | Enable TLS for secure communication. Default is `false`. |
| CERT_FILE | `"/certs/server.crt"` | Path to the TLS certificate file. Default is `"/certs/server.crt"`. |
Expand Down Expand Up @@ -44,11 +45,13 @@ After completing the [Getting Started](/docs/getting-started/_index.md) setup fo

#### The Hive

| Variable | Content | Description |
|----------------------|-----------------------------------|---------------------------------------------------------|
| THEHIVE_ACTIVATE | `false` | Enable integration with The Hive. Default is `false`. |
| THEHIVE_API_TOKEN | `your_token` | Set the API token for The Hive integration. |
| THEHIVE_API_BASE_URL | `http://your.thehive.instance/api/v1/` | Set the base URL for The Hive API. Default is `""`. |
| Variable | Content | Description |
|----------------------------|----------------------------------|---------------------------------------------------------|
| THEHIVE_ACTIVATE | `false` | Enable integration with The Hive. Default is `false`. |
| THEHIVE_REPORTER | `false` | Enable case reporting integration with The Hive. Default is `false`. |
| THEHIVE_ALLOW_INSECURE | `true` | Allow insecure connection to the hive. Default is `true`. |
| THEHIVE_API_TOKEN | `your_token` | Set the API token for The Hive integration. |
| THEHIVE_API_BASE_URL | `http://your.thehive.instance/api/v1/` | Set the base URL for The Hive API. Default is `""`. |

-----

Expand Down