upSnap on Docker for Win10?
Does this work on docker for windows? The container looks like its running (default options) but is unreachable from the host machine or local LAN.
I have not tried it yet. What do the logs say? (Rough guess: it might be a windows networking issue. I had other problems with docker network on windows in the past.)
It doesn't work as its currently configured due to windows networking. Its definitely doable but I just installed on linux instead.
Ok, I don't plan to support windows. If you want to make it work, feel free to create a pull request.
So I got it mostly working with some changes to the network config in the compose file. I can reach the webUI, create and save hosts. Some stuff isn't working like network scan and the ability to check the status of a device. The WOL packet is definitely sent and received though. The issue is that network: host doesn't work on Windows or Mac.
Changes: exposed the frontend and backend ports to the host, created a custom network (so REDIS_HOST variable can equal container name) and added the network to both containers. Also removed network_mode: host.
Sample docker compose for SQLite:
services:
app:
container_name: upsnap_app
image: seriousm4x/upsnap:latest
restart: unless-stopped
ports:
- 8000:8000
- 8001:8001
networks:
- upsnap_net
environment:
- FRONTEND_PORT=8000
- BACKEND_PORT=8001
- DB_TYPE=sqlite
- REDIS_HOST=upsnap_redis
- REDIS_PORT=6379
depends_on:
redis:
condition: service_healthy
redis:
container_name: upsnap_redis
image: redis:alpine
ports:
- "6379:6379"
networks:
- upsnap_net
restart: unless-stopped
command: redis-server --loglevel warning
healthcheck:
test: redis-cli ping
interval: 10s
networks:
upsnap_net:
name: upsnap_net
I'll mention it in the readme as a "mostly working" solution for windows. But until it's not fully working, I won't add it. Feel free to update this issue, if you find better working solutions.