backend: use compose instead of run.sh

This commit is contained in:
tylen 2025-09-11 23:26:10 +03:00
parent 9a330f3743
commit 6d7ce9b8db
2 changed files with 10 additions and 13 deletions

View File

@ -0,0 +1,10 @@
version: '3.8'
services:
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "2027:5000"
container_name: "${CONTAINER_NAME:-nyi-backend}"

View File

@ -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 $?