Skip to content

Commit

Permalink
Reorganise compose and dockerfile (fix this commit up)
Browse files Browse the repository at this point in the history
  • Loading branch information
steventux committed Jan 8, 2025
1 parent 8ec23e1 commit 12215cd
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
11 changes: 5 additions & 6 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ services:
profiles:
- dev

communication-management:
container_name: communication-management
communication-management-api:
container_name: communication-management-api
network_mode: host
build:
context: .
context: ./src/communication-management-api
dockerfile: Dockerfile
depends_on:
db:
condition: service_healthy
additional_contexts:
root_dir: .
environment:
- AzureWebJobsStorage=UseDevelopmentStorage=true
- APPLICATION_ID=${APPLICATION_ID}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile → src/communication-management-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ RUN pip install pipenv
RUN pipenv install --system

COPY . /home/site/wwwroot
COPY ./database/schema.sql /home/site/wwwroot/database/schema.sql
COPY --from=root_dir /database/schema.sql /home/site/wwwroot/database/schema.sql
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@


@api.route("/status/health-check", methods=["GET"])
def status_health_check():
def status_health_check() -> tuple:
return jsonify({"status": "healthy"}), 200
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
flaskapp = create_app()


@funcapp.function_name(name="CommunicationManagementAPI")
@funcapp.route(
route="{*route}",
auth_level=func.AuthLevel.ANONYMOUS,
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
import sys

SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(SCRIPT_DIR) + "/../app/")
sys.path.insert(0, os.path.dirname(SCRIPT_DIR) + "/src/communication-management-api/")
print(sys.path)

0 comments on commit 12215cd

Please sign in to comment.