20 lines
		
	
	
	
		
			881 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			881 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:9.0.1
 | |
| FROM ${BUILD_FROM}
 | |
| 
 | |
| RUN apk add --no-cache nginx
 | |
| 
 | |
| ADD "https://github.com/jhbruhn/ZBS_Flasher/archive/refs/heads/database_path_config.tar.gz" /src.tar.gz
 | |
| RUN mkdir /src && tar xvfz /src.tar.gz -C /src --strip-components=1
 | |
| RUN mv /src/CC2531_station/epaper_station_websocket/ /app
 | |
| 
 | |
| WORKDIR /app
 | |
| RUN ls /src && pip install -r requirements.txt
 | |
| RUN mkdir /public && cp /app/online_viewer.html /public/index.html && cp /app/no_img.jpg /public/
 | |
| RUN sed -i 's/`ws:\/\/localhost:8000\/ws`/window.location.href.replace("http", "ws") + "\/ws\/"/g' /public/index.html 
 | |
| 
 | |
| ADD rootfs /
 | |
| 
 | |
| # Corrects permissions for s6 v3
 | |
| RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \
 | |
|     if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \
 | |
|     if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi
 |