Comments (3)
Thank you for your advice. You are right, Swirl's document should really have a pre requirements chapter. I will add this part later and provide a composite file out of the box.
from swirl.
For approach 2, DB_ADDRESS should be: mongodb://mongoroot:password@swirl_mongodb:27017/swirl. (Assuming compose name is swirl)
from swirl.
Thanks for the reply.
Do you mean approach two? There is only a service called mongodb in approach two - your reference docker compose has no mongodb service. I will take this as confirmation that your docs assume a pre-setup mongodb - might be good to actually call that out in the docs. If i end up with swirl as a permanent part of my setup i can help do docs.
You seem to be unaware that in a swarm stack you can call the service just by the service name - I assure you one can ping mongodb
from any container node in the stack just fine - it doesn't need the stackname_
prefix :-) and defining a network is redundant unless the network is used by another stack, but then it would need to be created as external.
It still appears on the surface to to me swirl doesn't support the latest auth mechanisms correctly in mongo - but i am making a lot of un-educated guesses to get to that conclusion! Again maybe its because i didn't do something i should on mongodb?
I also now realize that without a prometheus setup this is an incomplete solution. TBH the docs are very confusing about what this solution is, what is a pre-req. I think that's fine if you purely built this for yourself tho :-) - for someone who is coming from deep docker knowledge but no knowledge on what Prometheus or cadvisor are I had the wrong impression that swirl would give me out of the box stats (mostly the fault of the sites that linked me here), for example why would i need to go docker > cadvisor > prometheus when docker has native support / exporters for prometheus?
tl;dr This modified version below got me up and running to see what swirl is all about with the downside there is no no auth support. (and off to learn prometheus and i guess cadvisor at the weekend)
version: '3.8'
services:
swirl:
image: cuigh/swirl
environment:
DB_TYPE: mongo
DB_ADDRESS: mongodb://mongodb:27017/swirl
DOCKER_ENDPOINT: tcp://swirl_manager_agent:2375
AGENTS: swirl_manager_agent,swirl_worker_agent
ports:
- 8001:8001
deploy:
replicas: 1
placement:
constraints: [ node.role == worker ]
manager_agent:
image: cuigh/socat
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
placement:
constraints: [ node.role == manager ]
worker_agent:
image: cuigh/socat
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
placement:
constraints: [ node.role == worker ]
mongodb:
image: mongo
restart: always
# environment:
# MONGO_INITDB_ROOT_USERNAME: mongoroot
# MONGO_INITDB_ROOT_PASSWORD: password
mongo-express:
image: mongo-express
restart: always
ports:
- 7081:8081
environment:
# ME_CONFIG_MONGODB_ADMINUSERNAME: mongoroot
# ME_CONFIG_MONGODB_ADMINPASSWORD: password
ME_CONFIG_MONGODB_URL: mongodb://mongodb:27017/
BTW nice job on the image creation, i crawled over your dockerfile, love your keep it simple approach
from swirl.
Related Issues (20)
- support init config
- 现在有方案访问非swirl节点的容器嘛 HOT 2
- deploy stack can't auto create network HOT 1
- Feature request: User permission for single stack/service HOT 2
- Issue: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. HOT 2
- 在swirl中创建表格失败 HOT 1
- 请问如何成功指定 --constraint 'node.role == worker' HOT 4
- docker stack deploy 启动不成功 HOT 3
- 最新代码登录失败 HOT 2
- Question: Autonomous scaler HOT 7
- logged in 401 HOT 1
- How to use advanced functions? HOT 3
- arm image? HOT 1
- Wrong tasks on Node detail page
- Can't edit stack file
- Add option/environment var to disable auth HOT 10
- invalid mount config for type "bind": bind source path does not exist: /data/swirl HOT 6
- [Bug] Creating a username does not work properly for non-admin
- swirl behind traefik? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swirl.