diff --git a/Docker/README.md b/Docker/README.md index 305889c..b593c01 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -23,7 +23,14 @@ This script will: 3. Stop any existing containers with the same name 4. Start a new container with the application -After running the script, the application will be available at `http://[server-ip]:5003`. +Alternatively, you can use Docker Compose: + +```bash +cd Docker +docker compose up -d +``` + +After running either method, the application will be available at `http://[server-ip]:5003`. ## Manual Setup @@ -90,7 +97,21 @@ docker rm digital-twin-monitoring ### Updating the application -To update the application, pull the latest code, rebuild the image, and restart the container: +#### Using Docker Compose (Recommended) + +To update the application using Docker Compose, simply pull the latest code and restart the services: + +```bash +git pull +cd Docker +docker compose up -d +``` + +This will automatically rebuild the image if needed and restart the container with the updated code. + +#### Using Docker Commands + +Alternatively, you can update using individual Docker commands: ```bash git pull diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml new file mode 100644 index 0000000..261d0c3 --- /dev/null +++ b/Docker/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' + +services: + app: + build: + context: .. + dockerfile: Docker/Dockerfile + image: digital-twin-monitoring + container_name: digital-twin-monitoring + restart: unless-stopped + ports: + - "5003:5003" + env_file: + - ../.env + volumes: + - ..:/app \ No newline at end of file