-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added docker build + docker compose (#28)
* added docker build + docker compose * remove redudant line * fixed hardcoded version issue
- Loading branch information
1 parent
53faabb
commit 2f522ac
Showing
3 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:alpine as builder | ||
RUN apk update && apk upgrade && apk add --no-cache ca-certificates | ||
RUN update-ca-certificates | ||
|
||
FROM scratch | ||
LABEL MAINTAINER Author maarten de kruijf, RabbITCybErSeC | ||
|
||
ARG BINARY_NAME=soarca-gui | ||
ARG VERSION | ||
|
||
COPY bin/${BINARY_NAME}-${VERSION}-linux-amd64 /bin/soarca-gui | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
|
||
WORKDIR /bin | ||
|
||
EXPOSE 8081 | ||
|
||
CMD ["./soarca-gui"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
version: '3.7' | ||
services: | ||
mongodb_container: | ||
image: mongo:latest | ||
container_name: mongo_soarca_stack | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: "root" | ||
MONGO_INITDB_ROOT_PASSWORD: "rootpassword" | ||
networks: | ||
- db-net | ||
volumes: | ||
- mongodb_data_container:/data/db | ||
|
||
soarca: | ||
image: cossas/soarca:1.0.0-42-g8b62b16 | ||
container_name: soarca_server | ||
environment: | ||
PORT: 8080 | ||
SOARCA_ALLOWED_ORIGINS: "*" | ||
GIN_MODE: "release" | ||
MONGODB_URI: "mongodb://mongodb_container:27017" | ||
DATABASE_NAME: "soarca" | ||
DB_USERNAME: "root" | ||
DB_PASSWORD: "rootpassword" | ||
PLAYBOOK_API_LOG_LEVEL: trace | ||
DATABASE: "false" | ||
HTTP_SKIP_CERT_VALIDATION: false | ||
networks: | ||
- db-net | ||
- soarca-net | ||
ports: | ||
- 127.0.0.1:8080:8080 | ||
depends_on: | ||
- mongodb_container | ||
|
||
soarca-gui: | ||
build: | ||
dockerfile: Dockerfile | ||
args: | ||
VERSION: "${GIT_VERSION}" | ||
container_name: soarca_gui | ||
environment: | ||
SOARCA_URI: "http://soarca_server:8080" | ||
networks: | ||
- soarca-net | ||
ports: | ||
- 127.0.0.1:8081:8081 | ||
depends_on: | ||
- soarca | ||
|
||
networks: | ||
db-net: | ||
soarca-net: | ||
|
||
|
||
volumes: | ||
mongodb_data_container: |