#!/bin/bash # Name of the Docker network and application NETWORK_NAME="point-median-network" APP_NAME="point-median-frontend" # Create the Docker network if it doesn't exist if ! docker network inspect $NETWORK_NAME >/dev/null 2>&1; then echo "Creating Docker network: $NETWORK_NAME" docker network create $NETWORK_NAME else echo "Docker network $NETWORK_NAME already exists" fi # Stop and remove the existing container if it exists docker stop $APP_NAME >/dev/null 2>&1 docker rm $APP_NAME >/dev/null 2>&1 # Run the new container echo "Starting $APP_NAME container" docker run -d \ -p 5000:5000 \ --name $APP_NAME \ --env-file .env \ --network $NETWORK_NAME \ local/$APP_NAME echo "Container started. You can access the application at http://localhost:5000"