backend: use compose instead of run.sh
This commit is contained in:
parent
9a330f3743
commit
6d7ce9b8db
10
backend/docker-compose.yaml
Normal file
10
backend/docker-compose.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "2027:5000"
|
||||
container_name: "${CONTAINER_NAME:-nyi-backend}"
|
||||
@ -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 $?
|
||||
Loading…
x
Reference in New Issue
Block a user