Closed MikePadge closed 3 years ago
version: "3.3"
services:
mongodb:
image: mongo:4.2
ports:
- "27017:27017"
container_name: mongodb
volumes:
- mongovol:/data/db
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: mongoadmin
MONGO_INITDB_ROOT_PASSWORD: mongopass
# netmaker:
# container_name: netmaker
# depends_on:
# - mongodb
# image: gravitl/netmaker:v0.2
# ports:
# - "8081:8081"
# - "50051:50051"
# environment:
# MONGO_HOST: mongodb
# restart: always
netmaker-ui:
container_name: netmaker-ui
# depends_on:
# - netmaker
image: gravitl/netmaker-ui:v0.2
ports:
- "8088:80"
environment:
BACKEND_URL: "x.x.x.x:8081"
volumes:
mongovol: {}
I started the netmaker container image by itself via
docker run -dit -e "MONGO_HOST=mongodb" -p 50051:50051 -p 8081:8081 netmaker
Then docker network connect netmaker_default <containerid>
Refreshing the UI in any manner kills the netmaker container.
Backend_URL in the Docker-Compose requires http:// preceding the IP address and port designation
Adding servers after the fact via the cli command needs this http:// removed.
Also if you're a dumb dumb like me and think the MONGO_INITDB_ROOT_USERNAME: mongoadmin MONGO_INITDB_ROOT_PASSWORD: mongopass
Env vars are for initializing the database credentials, you would be incorrect. I changed these from the default, and what happens is netmaker launches like it already has a user created.
The bind port on the host for Netmaker-UI is the only thing I changed, but somehow this causes the netmaker container itself to get stuck in a reboot loop?