# SessionZero Docker Deployment Guide This guide explains how to build and deploy the SessionZero Blazor WebAssembly PWA using Docker. ## Prerequisites - Docker installed on your machine - Docker Compose installed on your machine (optional, but recommended) ## Building and Running with Docker Compose (Recommended) 1. Navigate to the project root directory (where the `docker-compose.yml` file is located) 2. Run the following command to build and start the container: ```bash docker-compose up -d --build ``` 3. Access the application at http://localhost:80 ## Building and Running with Docker CLI 1. Navigate to the project root directory (where the `Dockerfile` is located) 2. Build the Docker image: ```bash docker build -t sessionzero . ``` 3. Run the container: ```bash docker run -d -p 80:80 --name sessionzero-app sessionzero ``` 4. Access the application at http://localhost:80 ## Stopping the Container ### With Docker Compose ```bash docker-compose down ``` ### With Docker CLI ```bash docker stop sessionzero-app docker rm sessionzero-app ``` ## Troubleshooting - If you encounter any issues with the container not starting, check the logs: ```bash docker logs sessionzero-app ``` - Make sure port 80 is not being used by another application on your host machine. Note that port 80 often requires administrative privileges on most operating systems since it's a privileged port. - If the application doesn't work as expected, verify that all files were copied correctly by inspecting the container: ```bash docker exec -it sessionzero-app sh ls -la /usr/share/nginx/html ```