Commit 4b284540 authored by James Kirk's avatar James Kirk
Browse files

refactor: removed __init__ from root as it causes import issues in a container

feat: added in test compose and changed compose script to allow more options
2 merge requests!23Resolve "Release v0.1.0",!8Gitlab-ci
Pipeline #106866 failed with stages
in 1 minute and 35 seconds
FROM python:alpine3.17 FROM python:3.9.16
WORKDIR /app WORKDIR /app
# If we want to use the alpine image, we need these packages for pytest
# RUN apk update && apk add python3-dev gcc libc-dev libffi-dev
COPY requirements.txt requirements.txt COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt COPY requirements-dev.txt requirements-dev.txt
ENTRYPOINT [ "python" ] RUN pip install -r requirements.txt
\ No newline at end of file RUN pip install -r requirements-dev.txt
\ No newline at end of file
version: '3.8'
services:
soar_api_test:
build:
context: ..
dockerfile: docker/Dockerfile
volumes:
- ../:/app
command: "pytest"
container_name: soar_api_test
\ No newline at end of file
...@@ -21,7 +21,7 @@ services: ...@@ -21,7 +21,7 @@ services:
- MQ_HOST=rmq - MQ_HOST=rmq
volumes: volumes:
- ../:/app - ../:/app
command: "soar_bus.py" command: "python soar_bus.py"
container_name: soar_bus container_name: soar_bus
soar_api: soar_api:
...@@ -40,5 +40,5 @@ services: ...@@ -40,5 +40,5 @@ services:
- FLASK_HOST=0.0.0.0 - FLASK_HOST=0.0.0.0
volumes: volumes:
- ../:/app - ../:/app
command: "api.py" command: "python api.py"
container_name: soar_api container_name: soar_api
\ No newline at end of file
...@@ -17,6 +17,10 @@ while [ -n "$1" ]; do ...@@ -17,6 +17,10 @@ while [ -n "$1" ]; do
rebuild) rebuild)
EXTRA_ARGS="--build" EXTRA_ARGS="--build"
;; ;;
test)
docker-compose -f docker/docker-compose-test.yaml up --build
exit 0
;;
*) *)
usage usage
exit 0 exit 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment