From 6d7ce9b8db1078e01f6d56859c5fae098a46a366 Mon Sep 17 00:00:00 2001 From: tylen Date: Thu, 11 Sep 2025 23:26:10 +0300 Subject: [PATCH] backend: use compose instead of run.sh --- backend/docker-compose.yaml | 10 ++++++++++ backend/run.sh | 13 ------------- 2 files changed, 10 insertions(+), 13 deletions(-) create mode 100644 backend/docker-compose.yaml delete mode 100755 backend/run.sh diff --git a/backend/docker-compose.yaml b/backend/docker-compose.yaml new file mode 100644 index 0000000..d9ca187 --- /dev/null +++ b/backend/docker-compose.yaml @@ -0,0 +1,10 @@ +version: '3.8' + +services: + backend: + build: + context: . + dockerfile: Dockerfile + ports: + - "2027:5000" + container_name: "${CONTAINER_NAME:-nyi-backend}" diff --git a/backend/run.sh b/backend/run.sh deleted file mode 100755 index 52def0f..0000000 --- a/backend/run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Generate a random name for the container using uuidgen -container_name=$(uuidgen) - -# Build the Docker image with your project code and unit tests -docker build -t nyi-backend -f Dockerfile . - -# Run the Docker container with the unit tests and attach the output -docker run --tty --rm --name "$container_name" -p 2027:5000 nyi-backend - -# Exit the script with the exit code of the container -exit $?