@@ -87,7 +87,87 @@ LOGGING_KEY=
8787 </tr >
8888</table >
8989
90- ## Deployment ##
90+ ## Docker Deployment
91+
92+ ### Building the Docker Image
93+
94+ ``` bash
95+ # Build the Docker image
96+ yarn docker:build
97+
98+ # Or using docker directly
99+ docker build -t resgrid-dispatch-web .
100+ ```
101+
102+ ### Running with Docker
103+
104+ 1 . Copy the example environment file:
105+ ``` bash
106+ cp .env.docker.example .env.docker
107+ ```
108+
109+ 2 . Edit ` .env.docker ` with your configuration values.
110+
111+ 3 . Run the container:
112+ ``` bash
113+ # Using yarn script
114+ yarn docker:run
115+
116+ # Or using docker-compose
117+ yarn docker:up
118+ ```
119+
120+ ### Docker Environment Variables
121+
122+ The following environment variables can be set at runtime (no rebuild required):
123+
124+ | Variable | Default | Description |
125+ | ----------| ---------| -------------|
126+ | ` DISPATCH_BASE_API_URL ` | ` https://api.resgrid.com ` | Base URL for the Resgrid API |
127+ | ` DISPATCH_API_VERSION ` | ` v4 ` | API version |
128+ | ` DISPATCH_RESGRID_API_URL ` | ` /api/v4 ` | API path |
129+ | ` DISPATCH_CHANNEL_HUB_NAME ` | ` eventingHub ` | SignalR events hub name |
130+ | ` DISPATCH_REALTIME_GEO_HUB_NAME ` | ` geolocationHub ` | SignalR geolocation hub name |
131+ | ` DISPATCH_LOGGING_KEY ` | `` | Logging API key |
132+ | ` DISPATCH_APP_KEY ` | `` | Application key |
133+ | ` DISPATCH_MAPBOX_PUBKEY ` | `` | Mapbox public key |
134+ | ` DISPATCH_SENTRY_DSN ` | `` | Sentry DSN for error tracking |
135+ | ` DISPATCH_COUNTLY_APP_KEY ` | `` | Countly analytics app key |
136+ | ` DISPATCH_COUNTLY_SERVER_URL ` | `` | Countly server URL |
137+ | ` DISPATCH_MAINTENANCE_MODE ` | ` false ` | Enable maintenance mode |
138+
139+ ### Docker Commands
140+
141+ ``` bash
142+ # Build image
143+ yarn docker:build
144+
145+ # Run container with environment file
146+ yarn docker:run
147+
148+ # Start with docker-compose (detached)
149+ yarn docker:up
150+
151+ # Stop docker-compose services
152+ yarn docker:down
153+
154+ # View logs
155+ yarn docker:logs
156+ ```
157+
158+ ### Manual Docker Run
159+
160+ ``` bash
161+ docker run -d \
162+ -p 3000:80 \
163+ -e DISPATCH_BASE_API_URL=https://api.resgrid.com \
164+ -e DISPATCH_API_VERSION=v4 \
165+ -e DISPATCH_MAPBOX_PUBKEY=your_mapbox_key \
166+ --name resgrid-dispatch \
167+ resgrid-dispatch-web
168+ ```
169+
170+ ### Pull from Docker Hub
91171
92172 docker pull resgridllc/dispatch
93173
0 commit comments